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
- DataGridViewControlCollection.cs
- TabItem.cs
- DesignObjectWrapper.cs
- SemanticAnalyzer.cs
- EntityTemplateFactory.cs
- cookieexception.cs
- MulticastOption.cs
- Polyline.cs
- PersonalizationStateQuery.cs
- ViewValidator.cs
- ValidatingReaderNodeData.cs
- XmlEnumAttribute.cs
- WindowsGraphicsWrapper.cs
- TaskSchedulerException.cs
- StateMachineDesignerPaint.cs
- DateTimeParse.cs
- LabelDesigner.cs
- CreateSequenceResponse.cs
- LicenseProviderAttribute.cs
- Debug.cs
- TableRowCollection.cs
- DescendantOverDescendantQuery.cs
- ConstrainedGroup.cs
- EpmCustomContentSerializer.cs
- RuleDefinitions.cs
- URL.cs
- PackageDigitalSignature.cs
- MetafileHeaderEmf.cs
- cookiecontainer.cs
- FileUtil.cs
- PowerEase.cs
- SessionStateItemCollection.cs
- ReadOnlyHierarchicalDataSourceView.cs
- FrameworkElementAutomationPeer.cs
- DataObjectMethodAttribute.cs
- ResourcesBuildProvider.cs
- TrackBarRenderer.cs
- CharUnicodeInfo.cs
- Size.cs
- Internal.cs
- CachedResourceDictionaryExtension.cs
- SchemaExporter.cs
- EntitySetBaseCollection.cs
- SystemPens.cs
- DataBindingExpressionBuilder.cs
- ListenerChannelContext.cs
- Int32AnimationBase.cs
- NonParentingControl.cs
- XmlDocumentSurrogate.cs
- Misc.cs
- ToolStripDropDownMenu.cs
- ServicePoint.cs
- XmlSchemaSimpleType.cs
- SqlTriggerAttribute.cs
- SolidBrush.cs
- WindowsGraphics.cs
- MemoryMappedView.cs
- WorkItem.cs
- MemberProjectedSlot.cs
- Setter.cs
- DetailsViewInsertedEventArgs.cs
- PointValueSerializer.cs
- SQLStringStorage.cs
- SoapHeaderException.cs
- AuthenticateEventArgs.cs
- Token.cs
- EntityWithKeyStrategy.cs
- StopStoryboard.cs
- PerformanceCounter.cs
- StylusDevice.cs
- TableAdapterManagerGenerator.cs
- XmlAutoDetectWriter.cs
- TextChange.cs
- PriorityQueue.cs
- DrawToolTipEventArgs.cs
- RuleSettings.cs
- Int16Converter.cs
- ConfigsHelper.cs
- Point3DKeyFrameCollection.cs
- WorkflowFileItem.cs
- DesignerDataParameter.cs
- OutKeywords.cs
- BaseAddressPrefixFilterElement.cs
- Html32TextWriter.cs
- RawStylusSystemGestureInputReport.cs
- DataSysAttribute.cs
- EntityDataSourceEntitySetNameItem.cs
- HttpModule.cs
- FolderBrowserDialogDesigner.cs
- HitTestParameters3D.cs
- LockRecursionException.cs
- FileRecordSequence.cs
- DbSource.cs
- TemplateControlCodeDomTreeGenerator.cs
- ReadOnlyCollectionBase.cs
- BitConverter.cs
- XmlDocumentFragment.cs
- FormatterConverter.cs
- ReaderWriterLock.cs
- HttpListenerException.cs