Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / infocard / Service / managed / Microsoft / InfoCards / TokenFactoryBase.cs / 1 / TokenFactoryBase.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.InfoCards { using System; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.ServiceModel.Security; using IDT = Microsoft.InfoCards.Diagnostics.InfoCardTrace; // // Summary: // Base implementation of ITokenFactory. // internal abstract class TokenFactoryBase : ITokenFactory { bool m_aborted; public bool IsAborted { get{ return m_aborted; } } // // Summary: // Base CTOR for all derived classes // protected TokenFactoryBase() { } // // Summary: // Creates a TokenDescriptor object for the specified recipient. // // Params: // infoCard: The infocard that the token will be generated from. // credential: The credential object used to autenticate/authorize with a token factory. // policy: Specifies the policy of the relying party or identity provider. // discloseOptional: Specifies whether optional claims are to be disclosed. // public TokenDescriptor CreateToken( InfoCard infoCard, TokenFactoryCredential credential, InfoCardPolicy policy, bool discloseOptional ) { TokenCreationParameter param = null; // // If credentials where provided, and the credential used a param, get the param. // if( null != credential && TokenFactoryCredential.NoCredential != credential.ParameterIndex ) { param = infoCard.CreationParameters[ credential.ParameterIndex ]; } return ProduceToken( infoCard, param, credential, policy, discloseOptional ); } public void Abort() { OnAbort(); m_aborted = true; } // // Summary: // Derived class entrypoint. Implementers must implement this method. // protected abstract TokenDescriptor ProduceToken( InfoCard card, TokenCreationParameter parameters, TokenFactoryCredential credential, InfoCardPolicy policy, bool discloseOptional ); // // Overide when aborting the token creation. // protected virtual void OnAbort() { } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- UrlPath.cs
- RequestStatusBarUpdateEventArgs.cs
- CodeTypeDeclarationCollection.cs
- basecomparevalidator.cs
- BlurEffect.cs
- HeaderCollection.cs
- SecurityRuntime.cs
- SafeEventLogWriteHandle.cs
- AppSettingsSection.cs
- IntSecurity.cs
- WebSysDescriptionAttribute.cs
- MarshalDirectiveException.cs
- LinkLabelLinkClickedEvent.cs
- DataBinding.cs
- LongTypeConverter.cs
- CursorConverter.cs
- SqlDataSourceView.cs
- SliderAutomationPeer.cs
- BaseAppDomainProtocolHandler.cs
- ContextStaticAttribute.cs
- FrameworkElement.cs
- HebrewCalendar.cs
- WebPartVerbsEventArgs.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- SqlInternalConnectionTds.cs
- ICollection.cs
- SqlDataSourceSelectingEventArgs.cs
- BaseProcessor.cs
- NotFiniteNumberException.cs
- WithStatement.cs
- MouseButton.cs
- TextBlockAutomationPeer.cs
- DocumentApplicationDocumentViewer.cs
- ExpressionStringBuilder.cs
- XmlDeclaration.cs
- WeakHashtable.cs
- XmlValueConverter.cs
- Variable.cs
- WebHeaderCollection.cs
- ExecutionContext.cs
- GroupStyle.cs
- GroupLabel.cs
- ResXResourceSet.cs
- ExternalFile.cs
- ValueUtilsSmi.cs
- AdPostCacheSubstitution.cs
- ObjectMemberMapping.cs
- PrincipalPermission.cs
- Registration.cs
- LicenseException.cs
- ApplicationContext.cs
- OAVariantLib.cs
- XmlSchema.cs
- PrintDialog.cs
- CacheAxisQuery.cs
- SqlCrossApplyToCrossJoin.cs
- MappedMetaModel.cs
- XsltContext.cs
- InternalUserCancelledException.cs
- PerformanceCounter.cs
- MenuItemBindingCollection.cs
- DefaultAsyncDataDispatcher.cs
- returneventsaver.cs
- CurrencyManager.cs
- DatasetMethodGenerator.cs
- SchemaCollectionPreprocessor.cs
- CodeSubDirectory.cs
- ZipIOFileItemStream.cs
- CompilationSection.cs
- namescope.cs
- IsolatedStorageSecurityState.cs
- DataSourceXmlElementAttribute.cs
- ContainerUtilities.cs
- ContentFilePart.cs
- DateTimeUtil.cs
- oledbmetadatacollectionnames.cs
- Types.cs
- CodeRemoveEventStatement.cs
- DynamicPropertyReader.cs
- WebPartMenuStyle.cs
- WebBrowserNavigatingEventHandler.cs
- StringBuilder.cs
- ImageField.cs
- NoneExcludedImageIndexConverter.cs
- LinkArea.cs
- RegexTypeEditor.cs
- Propagator.JoinPropagator.cs
- TextTreeUndoUnit.cs
- Overlapped.cs
- IssuedTokenServiceCredential.cs
- DynamicDataExtensions.cs
- NavigateUrlConverter.cs
- ComponentCommands.cs
- TreeNodeStyleCollection.cs
- IntSecurity.cs
- DecryptRequest.cs
- Subset.cs
- WebPartMenuStyle.cs
- TextCharacters.cs
- TextElementAutomationPeer.cs