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
- RectangleGeometry.cs
- BamlMapTable.cs
- DBConcurrencyException.cs
- DrawingImage.cs
- MouseBinding.cs
- ButtonPopupAdapter.cs
- DataViewSettingCollection.cs
- XmlUtilWriter.cs
- DragDrop.cs
- TransformPattern.cs
- SqlError.cs
- MatcherBuilder.cs
- ResourcesChangeInfo.cs
- SessionPageStateSection.cs
- StreamingContext.cs
- ContainerFilterService.cs
- StringBuilder.cs
- LateBoundBitmapDecoder.cs
- IDQuery.cs
- TrackPointCollection.cs
- XNodeSchemaApplier.cs
- DataGridRelationshipRow.cs
- ObjectSpanRewriter.cs
- CompositeKey.cs
- ListBoxAutomationPeer.cs
- RectConverter.cs
- EntityDataSource.cs
- GenericTypeParameterBuilder.cs
- DataGridParentRows.cs
- StrokeIntersection.cs
- DataGridViewTextBoxCell.cs
- CodeTypeParameterCollection.cs
- DoubleLinkListEnumerator.cs
- ISCIIEncoding.cs
- WorkflowInstanceAbortedRecord.cs
- NavigationPropertySingletonExpression.cs
- ipaddressinformationcollection.cs
- Geometry.cs
- MethodExpression.cs
- Clipboard.cs
- CodeDefaultValueExpression.cs
- HtmlTable.cs
- Utils.cs
- ImageAutomationPeer.cs
- CodeNamespaceImportCollection.cs
- KeyGesture.cs
- HTMLTagNameToTypeMapper.cs
- StateDesigner.Helpers.cs
- DataServiceProviderMethods.cs
- AppSettingsSection.cs
- ProxyRpc.cs
- CoreSwitches.cs
- XmlSchemaSimpleTypeUnion.cs
- EnterpriseServicesHelper.cs
- XmlStreamNodeWriter.cs
- StringStorage.cs
- TypeInformation.cs
- ImmComposition.cs
- SaveFileDialog.cs
- BrowsableAttribute.cs
- PasswordRecoveryDesigner.cs
- TypeDescriptionProviderAttribute.cs
- safelinkcollection.cs
- TextSyndicationContentKindHelper.cs
- TraceContextRecord.cs
- EntityDataSourceViewSchema.cs
- XmlDataSource.cs
- PropertyStore.cs
- XmlSchemaComplexType.cs
- EventLogPermission.cs
- IndividualDeviceConfig.cs
- SqlCaseSimplifier.cs
- RouteParameter.cs
- ChannelTracker.cs
- MobileErrorInfo.cs
- QueryOutputWriterV1.cs
- SecuritySessionFilter.cs
- UDPClient.cs
- SuppressMergeCheckAttribute.cs
- LinqDataSourceSelectEventArgs.cs
- PrimitiveList.cs
- DrawingDrawingContext.cs
- DataObjectPastingEventArgs.cs
- SaveFileDialog.cs
- ParameterDataSourceExpression.cs
- HtmlForm.cs
- InteropDesigner.xaml.cs
- OLEDB_Util.cs
- ListDictionaryInternal.cs
- TextWriterEngine.cs
- InvalidProgramException.cs
- login.cs
- GroupQuery.cs
- ServerValidateEventArgs.cs
- DataGridView.cs
- FontFamily.cs
- coordinatorfactory.cs
- SoapMessage.cs
- ColumnTypeConverter.cs
- RemotingConfigParser.cs