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
- DataGridViewCellParsingEventArgs.cs
- RectAnimationClockResource.cs
- CompatibleIComparer.cs
- DefinitionUpdate.cs
- SudsParser.cs
- OverlappedContext.cs
- EntityDataSourceStatementEditorForm.cs
- CollectionChangeEventArgs.cs
- MultiByteCodec.cs
- ProtocolsSection.cs
- LockRecursionException.cs
- TimeStampChecker.cs
- Pen.cs
- PopupEventArgs.cs
- StatusBarAutomationPeer.cs
- ConditionCollection.cs
- BindingList.cs
- FormsAuthenticationUserCollection.cs
- DataGridViewTextBoxCell.cs
- HTMLTagNameToTypeMapper.cs
- IProducerConsumerCollection.cs
- UseLicense.cs
- WorkflowRuntimeSection.cs
- DateTimeFormatInfo.cs
- SQLDecimal.cs
- RSACryptoServiceProvider.cs
- TrustManagerPromptUI.cs
- FolderLevelBuildProviderCollection.cs
- MemberMemberBinding.cs
- LinqDataSourceUpdateEventArgs.cs
- ImpersonationContext.cs
- PeerNameRecord.cs
- EditorZoneBase.cs
- CompModSwitches.cs
- WindowsPen.cs
- OdbcDataReader.cs
- Lock.cs
- ListViewItemSelectionChangedEvent.cs
- MappingSource.cs
- HashAlgorithm.cs
- LogLogRecordEnumerator.cs
- BaseValidator.cs
- NetworkInformationPermission.cs
- WorkflowTraceTransfer.cs
- LoadedOrUnloadedOperation.cs
- Vector3DAnimationUsingKeyFrames.cs
- OdbcEnvironmentHandle.cs
- FramingDecoders.cs
- PerformanceCounterPermissionAttribute.cs
- EnumConverter.cs
- CompilerLocalReference.cs
- CollectionConverter.cs
- DetailsViewDeletedEventArgs.cs
- ApplicationDirectory.cs
- KeyedPriorityQueue.cs
- autovalidator.cs
- SystemIcmpV4Statistics.cs
- BuildResult.cs
- ToolStripPanelRow.cs
- ValidatorCompatibilityHelper.cs
- UInt16Converter.cs
- DbMetaDataColumnNames.cs
- XslCompiledTransform.cs
- ResourceReferenceKeyNotFoundException.cs
- CodeGotoStatement.cs
- SoapObjectReader.cs
- ProfileGroupSettingsCollection.cs
- CallbackHandler.cs
- BindingMAnagerBase.cs
- GlobalProxySelection.cs
- SmiMetaDataProperty.cs
- EdmFunction.cs
- DispatcherObject.cs
- BitmapSizeOptions.cs
- RadioButtonStandardAdapter.cs
- GridEntryCollection.cs
- PlatformCulture.cs
- WebPartExportVerb.cs
- XmlAttributeCache.cs
- ExpressionBuilderCollection.cs
- HandleCollector.cs
- SmtpLoginAuthenticationModule.cs
- Point4DConverter.cs
- QueueProcessor.cs
- HyperLinkField.cs
- SplayTreeNode.cs
- EntryWrittenEventArgs.cs
- SmtpCommands.cs
- View.cs
- PolyLineSegment.cs
- IdentityManager.cs
- WebRequestModuleElementCollection.cs
- CatalogPartChrome.cs
- HtmlGenericControl.cs
- KnownBoxes.cs
- SQLCharsStorage.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- DbMetaDataColumnNames.cs
- ImageDrawing.cs
- DBConnection.cs