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
- WindowsTab.cs
- GraphicsContainer.cs
- RangeValuePatternIdentifiers.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- PageClientProxyGenerator.cs
- ListViewDeleteEventArgs.cs
- Reference.cs
- ContextMenuStrip.cs
- CompositeTypefaceMetrics.cs
- AppliedDeviceFiltersEditor.cs
- LateBoundBitmapDecoder.cs
- BrowserCapabilitiesFactory.cs
- CheckoutException.cs
- _AcceptOverlappedAsyncResult.cs
- MenuItemBinding.cs
- ValueUnavailableException.cs
- PowerModeChangedEventArgs.cs
- WindowsListViewGroup.cs
- FocusManager.cs
- MetadataUtilsSmi.cs
- WmpBitmapEncoder.cs
- SelectionItemPattern.cs
- StringStorage.cs
- CollectionViewGroupRoot.cs
- SubMenuStyleCollection.cs
- ExceptionUtil.cs
- ExitEventArgs.cs
- ExceptionHandler.cs
- ConnectionProviderAttribute.cs
- Matrix3D.cs
- NumberFormatInfo.cs
- DataGridCommandEventArgs.cs
- ListBoxItemAutomationPeer.cs
- RelatedPropertyManager.cs
- ZipIOExtraFieldPaddingElement.cs
- HashAlgorithm.cs
- ReliabilityContractAttribute.cs
- MinimizableAttributeTypeConverter.cs
- AnnotationResource.cs
- WindowsListViewItemCheckBox.cs
- EntityDataSourceContextCreatingEventArgs.cs
- ValidationPropertyAttribute.cs
- XmlText.cs
- WebReferencesBuildProvider.cs
- Domain.cs
- FullTextLine.cs
- CharUnicodeInfo.cs
- Rect3D.cs
- DispatcherProcessingDisabled.cs
- SystemEvents.cs
- SchemaContext.cs
- StreamWriter.cs
- ToolStripMenuItem.cs
- InstanceDescriptor.cs
- VirtualizingStackPanel.cs
- RequestResizeEvent.cs
- DefaultBinder.cs
- ECDiffieHellman.cs
- StylusPointPropertyId.cs
- NavigationPropertyEmitter.cs
- WebSysDefaultValueAttribute.cs
- XmlDictionaryReaderQuotas.cs
- FamilyTypefaceCollection.cs
- DocumentSchemaValidator.cs
- HttpRuntimeSection.cs
- EffectiveValueEntry.cs
- ClientTargetSection.cs
- NamespaceEmitter.cs
- CancellableEnumerable.cs
- X509PeerCertificateAuthenticationElement.cs
- FormDocumentDesigner.cs
- Tablet.cs
- StrokeCollectionDefaultValueFactory.cs
- DataGridViewControlCollection.cs
- ConnectionManagementSection.cs
- SoapTypeAttribute.cs
- WebPartMenuStyle.cs
- LayoutDump.cs
- LeaseManager.cs
- ComponentDispatcher.cs
- ExecutionContext.cs
- Shape.cs
- ProfessionalColors.cs
- ActivityBindForm.Designer.cs
- XmlEntityReference.cs
- Debug.cs
- CodeAttributeArgument.cs
- RegexCaptureCollection.cs
- NopReturnReader.cs
- SequenceDesigner.xaml.cs
- LifetimeMonitor.cs
- PageOutputColor.cs
- CodeDirectiveCollection.cs
- TwoPhaseCommit.cs
- _BufferOffsetSize.cs
- SpecialNameAttribute.cs
- UInt64.cs
- HttpStreamXmlDictionaryReader.cs
- smtppermission.cs
- ResourcePool.cs