Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Selectors / WindowsSecurityTokenAuthenticator.cs / 1305376 / WindowsSecurityTokenAuthenticator.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Selectors { using System.Collections.Generic; using System.Collections.ObjectModel; using System.IdentityModel.Claims; using System.IdentityModel.Policy; using System.IdentityModel.Tokens; public class WindowsSecurityTokenAuthenticator : SecurityTokenAuthenticator { bool includeWindowsGroups; public WindowsSecurityTokenAuthenticator() : this(WindowsClaimSet.DefaultIncludeWindowsGroups) { } public WindowsSecurityTokenAuthenticator(bool includeWindowsGroups) { this.includeWindowsGroups = includeWindowsGroups; } protected override bool CanValidateTokenCore(SecurityToken token) { return token is WindowsSecurityToken; } protected override ReadOnlyCollectionValidateTokenCore(SecurityToken token) { WindowsSecurityToken windowsToken = (WindowsSecurityToken)token; WindowsClaimSet claimSet = new WindowsClaimSet(windowsToken.WindowsIdentity, windowsToken.AuthenticationType, this.includeWindowsGroups, windowsToken.ValidTo); return SecurityUtils.CreateAuthorizationPolicies(claimSet, windowsToken.ValidTo); } } } // 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
- AccessViolationException.cs
- ValidationSummary.cs
- _AuthenticationState.cs
- ClientTarget.cs
- StylusPointProperties.cs
- XmlImplementation.cs
- TextDataBindingHandler.cs
- CacheEntry.cs
- ToolboxCategoryItems.cs
- NumberSubstitution.cs
- TypeConverter.cs
- SetStateEventArgs.cs
- DataRowCollection.cs
- Dynamic.cs
- PersonalizationProviderCollection.cs
- BuildTopDownAttribute.cs
- ObjectDataProvider.cs
- WasNotInstalledException.cs
- ObjectAssociationEndMapping.cs
- DomainUpDown.cs
- DataGridViewCellMouseEventArgs.cs
- Message.cs
- ListSortDescriptionCollection.cs
- Pointer.cs
- SqlDependencyListener.cs
- GetReadStreamResult.cs
- BufferedReceiveElement.cs
- sqlcontext.cs
- ProtocolsConfigurationHandler.cs
- PriorityRange.cs
- NamespaceQuery.cs
- XmlSchemaCompilationSettings.cs
- InternalResources.cs
- ContextStaticAttribute.cs
- KnownBoxes.cs
- AgileSafeNativeMemoryHandle.cs
- XNameConverter.cs
- TreeNodeClickEventArgs.cs
- TextParagraphView.cs
- ProcessingInstructionAction.cs
- PathStreamGeometryContext.cs
- EncodingTable.cs
- CompleteWizardStep.cs
- StringKeyFrameCollection.cs
- MemberMaps.cs
- RC2CryptoServiceProvider.cs
- DataGridViewImageCell.cs
- DocumentXmlWriter.cs
- TabletDevice.cs
- ChangeDirector.cs
- FlowDocumentView.cs
- UrlParameterReader.cs
- HttpRequest.cs
- ServiceObjectContainer.cs
- VersionConverter.cs
- SystemIPAddressInformation.cs
- Choices.cs
- ListBoxChrome.cs
- StrokeCollection2.cs
- PropertyItemInternal.cs
- BaseProcessProtocolHandler.cs
- XmlObjectSerializerReadContextComplex.cs
- GuidelineCollection.cs
- ResourceExpression.cs
- SpStreamWrapper.cs
- DataGridViewAccessibleObject.cs
- GradientSpreadMethodValidation.cs
- XMLSchema.cs
- WrapPanel.cs
- SafeRightsManagementPubHandle.cs
- Group.cs
- PhysicalAddress.cs
- FixedSOMPageElement.cs
- CalendarKeyboardHelper.cs
- XslAst.cs
- BindingWorker.cs
- DataGridCaption.cs
- AudioFormatConverter.cs
- EventBuilder.cs
- ApplicationBuildProvider.cs
- DocumentPageHost.cs
- MemoryPressure.cs
- CatalogZone.cs
- NumericUpDownAccelerationCollection.cs
- XmlSchemaValidationException.cs
- IISUnsafeMethods.cs
- PageClientProxyGenerator.cs
- StylusPointPropertyInfoDefaults.cs
- Visual3D.cs
- TextContainerChangeEventArgs.cs
- RotateTransform3D.cs
- ObjectDataSourceSelectingEventArgs.cs
- ConditionBrowserDialog.cs
- Vector3DAnimation.cs
- ConfigViewGenerator.cs
- PackWebResponse.cs
- WebControlsSection.cs
- ObservableDictionary.cs
- Funcletizer.cs
- entityreference_tresulttype.cs