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
- Geometry.cs
- FileEnumerator.cs
- InternalRelationshipCollection.cs
- EastAsianLunisolarCalendar.cs
- ObjectDataSourceSelectingEventArgs.cs
- StyleSheet.cs
- ZoomPercentageConverter.cs
- Span.cs
- RadioButtonList.cs
- SupportsEventValidationAttribute.cs
- FullTextState.cs
- MessagePropertyDescriptionCollection.cs
- BidOverLoads.cs
- MailAddressParser.cs
- StrongNameUtility.cs
- dbenumerator.cs
- Constants.cs
- CoreSwitches.cs
- SoapInteropTypes.cs
- DeviceContext2.cs
- SizeChangedInfo.cs
- ItemsControlAutomationPeer.cs
- CustomAttributeFormatException.cs
- XmlBoundElement.cs
- LabelLiteral.cs
- Int16.cs
- AutomationEvent.cs
- WinFormsComponentEditor.cs
- Path.cs
- XsdValidatingReader.cs
- SinglePageViewer.cs
- HttpCapabilitiesEvaluator.cs
- NTAccount.cs
- ReaderOutput.cs
- CharEnumerator.cs
- TableStyle.cs
- UnaryQueryOperator.cs
- XmlCollation.cs
- BuildResult.cs
- CodeBinaryOperatorExpression.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- SliderAutomationPeer.cs
- XmlEntityReference.cs
- FastPropertyAccessor.cs
- ReadOnlyTernaryTree.cs
- EncodingInfo.cs
- HttpListener.cs
- FaultImportOptions.cs
- SequenceNumber.cs
- XPathDescendantIterator.cs
- ReliableInputConnection.cs
- ContentType.cs
- TypeSystem.cs
- ContextConfiguration.cs
- PropertyInformation.cs
- ProfileProvider.cs
- Win32.cs
- PropertyMetadata.cs
- HybridObjectCache.cs
- ToolboxComponentsCreatedEventArgs.cs
- QuaternionValueSerializer.cs
- UTF7Encoding.cs
- XmlNodeList.cs
- MILUtilities.cs
- StackSpiller.Temps.cs
- PersonalizationEntry.cs
- PenThreadPool.cs
- EasingFunctionBase.cs
- OpCodes.cs
- Exceptions.cs
- XmlSiteMapProvider.cs
- KeyFrames.cs
- XmlAutoDetectWriter.cs
- MenuItemBindingCollection.cs
- InvokeProviderWrapper.cs
- DetailsViewRow.cs
- SlotInfo.cs
- InheritedPropertyChangedEventArgs.cs
- WinEventQueueItem.cs
- DefaultWorkflowSchedulerService.cs
- ItemCheckedEvent.cs
- Effect.cs
- CapiNative.cs
- SwitchAttribute.cs
- Internal.cs
- StrongBox.cs
- GeometryDrawing.cs
- PointKeyFrameCollection.cs
- DrawingCollection.cs
- SystemException.cs
- Descriptor.cs
- ListenerTraceUtility.cs
- PropertyGrid.cs
- UndoUnit.cs
- DynamicQueryableWrapper.cs
- EntityException.cs
- XMLSyntaxException.cs
- ProvideValueServiceProvider.cs
- InternalBufferOverflowException.cs
- OneWayChannelListener.cs