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 ReadOnlyCollection ValidateTokenCore(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
- MetaForeignKeyColumn.cs
- RegistryPermission.cs
- X509Certificate2Collection.cs
- NameValueSectionHandler.cs
- ResizeBehavior.cs
- TemplateControl.cs
- XmlSchemaDatatype.cs
- WebPartCollection.cs
- DataGridPagerStyle.cs
- FormsAuthenticationTicket.cs
- Pair.cs
- TextTreeInsertUndoUnit.cs
- CustomTypeDescriptor.cs
- EventSourceCreationData.cs
- CursorConverter.cs
- MdiWindowListItemConverter.cs
- XmlRawWriterWrapper.cs
- SqlDataSourceSelectingEventArgs.cs
- SimpleBitVector32.cs
- StringKeyFrameCollection.cs
- ReadOnlyCollection.cs
- InputGestureCollection.cs
- DataGridItem.cs
- GACMembershipCondition.cs
- MatcherBuilder.cs
- SelectionListDesigner.cs
- StandardOleMarshalObject.cs
- securestring.cs
- TableHeaderCell.cs
- TypeSemantics.cs
- InternalDuplexBindingElement.cs
- JsonReaderWriterFactory.cs
- WebPartConnectionsCancelEventArgs.cs
- mediaeventshelper.cs
- RoutingChannelExtension.cs
- DataService.cs
- fixedPageContentExtractor.cs
- HtmlTableRowCollection.cs
- ComponentChangedEvent.cs
- ToggleButton.cs
- UITypeEditor.cs
- StringUtil.cs
- LoadedOrUnloadedOperation.cs
- FontSource.cs
- SafeEventLogWriteHandle.cs
- DataGridViewButtonCell.cs
- WebPartCatalogCloseVerb.cs
- ConnectionString.cs
- WebPartEditorApplyVerb.cs
- ListViewCommandEventArgs.cs
- TypeBuilder.cs
- SettingsProperty.cs
- CqlParserHelpers.cs
- EventToken.cs
- SystemIPGlobalProperties.cs
- AnnotationHelper.cs
- ResourcePool.cs
- HwndSourceKeyboardInputSite.cs
- CodeSnippetStatement.cs
- ToolStripSeparatorRenderEventArgs.cs
- ConditionalExpression.cs
- RotateTransform.cs
- behaviorssection.cs
- BezierSegment.cs
- XmlDocument.cs
- RtType.cs
- BrowserCapabilitiesCodeGenerator.cs
- SharedPerformanceCounter.cs
- SmiMetaData.cs
- InvalidCastException.cs
- StackOverflowException.cs
- WebPartEditorOkVerb.cs
- FixedSOMSemanticBox.cs
- LinearGradientBrush.cs
- NameService.cs
- SchemaElementLookUpTable.cs
- Image.cs
- TraceLevelStore.cs
- DescendentsWalkerBase.cs
- MyContact.cs
- BypassElement.cs
- safemediahandle.cs
- FontNamesConverter.cs
- InternalPermissions.cs
- ImageMap.cs
- PriorityItem.cs
- QueryContinueDragEventArgs.cs
- ObjectStateFormatter.cs
- ConfigPathUtility.cs
- XmlAttributeCollection.cs
- TypeLibConverter.cs
- CustomLineCap.cs
- WebPartManagerInternals.cs
- __Filters.cs
- BitmapDownload.cs
- FindCriteria.cs
- IdentityNotMappedException.cs
- XPathException.cs
- PerformanceCounterManager.cs
- EnumDataContract.cs