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
- ZipFileInfo.cs
- DesignerAttributeInfo.cs
- ControlBuilder.cs
- RemotingHelper.cs
- URL.cs
- DbExpressionBuilder.cs
- EdmError.cs
- ForEach.cs
- _HeaderInfoTable.cs
- RelOps.cs
- SSmlParser.cs
- DynamicILGenerator.cs
- PageParserFilter.cs
- LocalizationComments.cs
- HtmlDocument.cs
- ToolstripProfessionalRenderer.cs
- PointAnimationBase.cs
- ObjectDataSourceMethodEventArgs.cs
- ArgumentOutOfRangeException.cs
- ExpressionList.cs
- ResourceDescriptionAttribute.cs
- MatrixValueSerializer.cs
- XmlSchemaInfo.cs
- UrlPath.cs
- BooleanAnimationBase.cs
- QueryAccessibilityHelpEvent.cs
- TableLayoutSettings.cs
- SortedSetDebugView.cs
- ScrollViewer.cs
- MetadataCollection.cs
- ExpressionLexer.cs
- DesignTimeParseData.cs
- WorkflowDesignerMessageFilter.cs
- DeflateStream.cs
- ProgressBarAutomationPeer.cs
- DateTimeFormatInfoScanner.cs
- ClientSideQueueItem.cs
- NameValueCollection.cs
- SafeEventLogWriteHandle.cs
- GotoExpression.cs
- ListMarkerLine.cs
- GenericIdentity.cs
- XmlC14NWriter.cs
- XmlSerializationReader.cs
- FrameDimension.cs
- LogicalExpressionEditor.cs
- CommandBinding.cs
- BaseDataList.cs
- StreamedFramingRequestChannel.cs
- BaseTemplateParser.cs
- Identifier.cs
- XmlSchemaGroupRef.cs
- DetailsViewUpdateEventArgs.cs
- ValidatingCollection.cs
- Int16Storage.cs
- ConsumerConnectionPointCollection.cs
- IIS7WorkerRequest.cs
- ControlsConfig.cs
- X509Certificate2Collection.cs
- HttpCacheParams.cs
- DataPagerFieldCommandEventArgs.cs
- SettingsBindableAttribute.cs
- ImageSourceValueSerializer.cs
- AlternateView.cs
- Viewport3DAutomationPeer.cs
- TextDecoration.cs
- SelfIssuedSamlTokenFactory.cs
- SchemaCollectionCompiler.cs
- embossbitmapeffect.cs
- WebPartUserCapability.cs
- HostingMessageProperty.cs
- OdbcFactory.cs
- Timer.cs
- TextServicesPropertyRanges.cs
- KeyTimeConverter.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- ListControlBoundActionList.cs
- WebPartExportVerb.cs
- TypeUsageBuilder.cs
- HostedElements.cs
- DataColumn.cs
- ContextQuery.cs
- IsolatedStorageFile.cs
- VScrollProperties.cs
- XLinq.cs
- SafeSystemMetrics.cs
- safemediahandle.cs
- TextEditorCopyPaste.cs
- XmlSchemaDocumentation.cs
- ButtonBase.cs
- OrderByExpression.cs
- AttributeCollection.cs
- TypeSystemHelpers.cs
- Control.cs
- __ConsoleStream.cs
- GeometryDrawing.cs
- DescriptionAttribute.cs
- CodeTypeReferenceExpression.cs
- TemplateControlBuildProvider.cs
- IndexedWhereQueryOperator.cs