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
- SequentialOutput.cs
- XmlCollation.cs
- DataRow.cs
- CalendarDataBindingHandler.cs
- MouseButton.cs
- SvcMapFileSerializer.cs
- Version.cs
- EntityDataSourceChangedEventArgs.cs
- RC2CryptoServiceProvider.cs
- WindowsUpDown.cs
- ProgressBar.cs
- Buffer.cs
- EnumerableWrapperWeakToStrong.cs
- CursorEditor.cs
- EncryptedKeyIdentifierClause.cs
- LiteralControl.cs
- WizardStepBase.cs
- SQLInt32.cs
- Point.cs
- RuntimeArgumentHandle.cs
- DefaultEventAttribute.cs
- FeatureAttribute.cs
- OneOfScalarConst.cs
- XmlSerializer.cs
- XmlJsonReader.cs
- ListGeneralPage.cs
- XmlSchemaGroup.cs
- Pair.cs
- DesignerWithHeader.cs
- Expander.cs
- ToolStripArrowRenderEventArgs.cs
- BamlRecordReader.cs
- XmlParserContext.cs
- Point3DCollection.cs
- SessionStateItemCollection.cs
- MetricEntry.cs
- ValueUtilsSmi.cs
- Propagator.JoinPropagator.cs
- TemplateXamlParser.cs
- errorpatternmatcher.cs
- DeclarativeCatalogPartDesigner.cs
- COM2ColorConverter.cs
- PersonalizationProviderCollection.cs
- CommandPlan.cs
- ProcessManager.cs
- DefaultAsyncDataDispatcher.cs
- Viewport2DVisual3D.cs
- DiscriminatorMap.cs
- DetailsViewInsertedEventArgs.cs
- DataSysAttribute.cs
- CustomTypeDescriptor.cs
- PlatformCulture.cs
- WeakReferenceKey.cs
- WrappedIUnknown.cs
- EarlyBoundInfo.cs
- TextSerializer.cs
- StateFinalizationDesigner.cs
- MsmqIntegrationSecurityMode.cs
- UIServiceHelper.cs
- unsafeIndexingFilterStream.cs
- VarRefManager.cs
- EventSetter.cs
- NumberSubstitution.cs
- X509Utils.cs
- ToolStripHighContrastRenderer.cs
- WindowsListViewItemStartMenu.cs
- OleDbFactory.cs
- Stroke2.cs
- ContainerParagraph.cs
- Wildcard.cs
- FontUnitConverter.cs
- FixedTextBuilder.cs
- SqlUnionizer.cs
- JavaScriptObjectDeserializer.cs
- PackageRelationship.cs
- QilInvokeEarlyBound.cs
- XamlWrappingReader.cs
- SetStateDesigner.cs
- MsmqInputChannelListenerBase.cs
- HtmlMeta.cs
- BamlLocalizabilityResolver.cs
- XmlSchemaElement.cs
- BmpBitmapDecoder.cs
- SafeNativeMemoryHandle.cs
- BindingContext.cs
- FormViewDeleteEventArgs.cs
- ProgressChangedEventArgs.cs
- ParenthesizePropertyNameAttribute.cs
- input.cs
- MetadataSerializer.cs
- NameValueSectionHandler.cs
- PenLineCapValidation.cs
- FixedSchema.cs
- HttpModuleCollection.cs
- EditorPart.cs
- CommandConverter.cs
- FixedSOMLineRanges.cs
- CounterCreationData.cs
- PolyLineSegment.cs
- OdbcConnectionString.cs