Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / X509WindowsSecurityToken.cs / 1305376 / X509WindowsSecurityToken.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Security.Cryptography.X509Certificates; using System.Security.Principal; public class X509WindowsSecurityToken : X509SecurityToken { WindowsIdentity windowsIdentity; bool disposed = false; string authenticationType; public X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity) : this(certificate, windowsIdentity, null, true) { } public X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string id) : this(certificate, windowsIdentity, null, id, true) { } public X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string authenticationType, string id) : this( certificate, windowsIdentity, authenticationType, id, true ) { } internal X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string authenticationType, bool clone) : this( certificate, windowsIdentity, authenticationType, SecurityUniqueId.Create().Value, clone ) { } internal X509WindowsSecurityToken(X509Certificate2 certificate, WindowsIdentity windowsIdentity, string authenticationType, string id, bool clone) : base(certificate, id, clone) { if (windowsIdentity == null) throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("windowsIdentity"); this.authenticationType = authenticationType; this.windowsIdentity = clone ? SecurityUtils.CloneWindowsIdentityIfNecessary(windowsIdentity, authenticationType) : windowsIdentity; } public WindowsIdentity WindowsIdentity { get { ThrowIfDisposed(); return this.windowsIdentity; } } public string AuthenticationType { get { return this.authenticationType; } } public override void Dispose() { try { if (!this.disposed) { this.disposed = true; this.windowsIdentity.Dispose(); } } finally { base.Dispose(); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AnnouncementEndpointElement.cs
- EventLogPermissionHolder.cs
- PowerModeChangedEventArgs.cs
- MailBnfHelper.cs
- GeometryValueSerializer.cs
- Comparer.cs
- ConstraintCollection.cs
- ReaderContextStackData.cs
- MachineKeySection.cs
- ConfigurationConverterBase.cs
- cookiecollection.cs
- ValueTypeFixupInfo.cs
- StringFormat.cs
- Publisher.cs
- RegexParser.cs
- MethodBody.cs
- EventListener.cs
- BindingSourceDesigner.cs
- SurrogateSelector.cs
- ValueType.cs
- ProtectedProviderSettings.cs
- RewritingProcessor.cs
- SemanticTag.cs
- SimplePropertyEntry.cs
- CLRBindingWorker.cs
- MultiBindingExpression.cs
- ConnectivityStatus.cs
- DependencyObjectPropertyDescriptor.cs
- GridViewUpdatedEventArgs.cs
- StateFinalizationActivity.cs
- FixedTextSelectionProcessor.cs
- Icon.cs
- SafeCryptoHandles.cs
- SamlAuthorizationDecisionStatement.cs
- ObservableDictionary.cs
- UInt64.cs
- XmlC14NWriter.cs
- TrackBar.cs
- TableLayoutSettingsTypeConverter.cs
- ContainerParaClient.cs
- ScriptIgnoreAttribute.cs
- SystemResources.cs
- SqlUnionizer.cs
- ServiceProviders.cs
- ObjectDataSourceView.cs
- dataSvcMapFileLoader.cs
- HostingEnvironmentSection.cs
- NetTcpSecurityElement.cs
- ScriptDescriptor.cs
- XhtmlBasicControlAdapter.cs
- XmlWrappingReader.cs
- TabPage.cs
- SettingsAttributes.cs
- TextRangeEditLists.cs
- WorkflowRuntimeEndpoint.cs
- SmiMetaDataProperty.cs
- GridView.cs
- SqlDataSourceConnectionPanel.cs
- columnmapfactory.cs
- unsafenativemethodsother.cs
- ObjectStateFormatter.cs
- TextParaClient.cs
- BidPrivateBase.cs
- FSWPathEditor.cs
- SqlDeflator.cs
- RectAnimationUsingKeyFrames.cs
- BmpBitmapEncoder.cs
- ColorConvertedBitmap.cs
- XmlWriterTraceListener.cs
- MarkupObject.cs
- StateFinalizationActivity.cs
- HtmlElementCollection.cs
- IfAction.cs
- RenderContext.cs
- FrameworkReadOnlyPropertyMetadata.cs
- Validator.cs
- SiteMapNode.cs
- DataServiceRequestArgs.cs
- TableItemStyle.cs
- IndicFontClient.cs
- InputBinding.cs
- PagedDataSource.cs
- WebColorConverter.cs
- SchemaInfo.cs
- oledbmetadatacollectionnames.cs
- TypeInitializationException.cs
- SqlCaseSimplifier.cs
- ControlBuilderAttribute.cs
- IdentityElement.cs
- OdbcConnection.cs
- RegexCapture.cs
- Stopwatch.cs
- UInt16.cs
- CurrencyManager.cs
- CompositeDesignerAccessibleObject.cs
- SQLByteStorage.cs
- LoadItemsEventArgs.cs
- ImpersonateTokenRef.cs
- ExternalException.cs
- CellParaClient.cs