Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Selectors / SecurityTokenAuthenticator.cs / 1 / SecurityTokenAuthenticator.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.IdentityModel.Selectors { using System.Collections.ObjectModel; using System.IdentityModel.Policy; using System.IdentityModel.Tokens; public abstract class SecurityTokenAuthenticator { protected SecurityTokenAuthenticator() { } public bool CanValidateToken(SecurityToken token) { if (token == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("token"); } return this.CanValidateTokenCore(token); } public ReadOnlyCollectionValidateToken(SecurityToken token) { if (token == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("token"); } if (!CanValidateToken(token)) { // warning 56506: Parameter 'token' to this public method must be validated: A null-dereference can occur here. #pragma warning suppress 56506 throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(SR.GetString(SR.CannotValidateSecurityTokenType, this, token.GetType()))); } ReadOnlyCollection authorizationPolicies = ValidateTokenCore(token); if (authorizationPolicies == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new SecurityTokenValidationException(SR.GetString(SR.CannotValidateSecurityTokenType, this, token.GetType()))); } return authorizationPolicies; } protected abstract bool CanValidateTokenCore(SecurityToken token); protected abstract ReadOnlyCollection ValidateTokenCore(SecurityToken token); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AdornerDecorator.cs
- MetaDataInfo.cs
- ConfigurationManager.cs
- WsdlInspector.cs
- RuntimeArgumentHandle.cs
- MouseGestureConverter.cs
- Int16.cs
- ObjectDataSourceSelectingEventArgs.cs
- UpdateRecord.cs
- TypeResolver.cs
- ScriptResourceInfo.cs
- InstalledFontCollection.cs
- LocatorGroup.cs
- InitializationEventAttribute.cs
- PtsPage.cs
- FontResourceCache.cs
- ParenthesizePropertyNameAttribute.cs
- SqlTypesSchemaImporter.cs
- XamlValidatingReader.cs
- MailMessageEventArgs.cs
- HtmlControlPersistable.cs
- ITreeGenerator.cs
- EntryIndex.cs
- StructureChangedEventArgs.cs
- StringAttributeCollection.cs
- DataContractSerializerOperationGenerator.cs
- ObjectStateEntry.cs
- DataException.cs
- WebBrowserUriTypeConverter.cs
- ToolStripContainer.cs
- TextCollapsingProperties.cs
- SecurityTokenProvider.cs
- DispatcherProcessingDisabled.cs
- FtpWebRequest.cs
- RequestCachingSection.cs
- AutoFocusStyle.xaml.cs
- XsdDateTime.cs
- Calendar.cs
- WebPartVerbCollection.cs
- SpecialFolderEnumConverter.cs
- SemaphoreFullException.cs
- PathTooLongException.cs
- GenericEnumerator.cs
- RtfToXamlLexer.cs
- PtsHost.cs
- ProcessThread.cs
- ShaderRenderModeValidation.cs
- SystemIcmpV4Statistics.cs
- OneOfScalarConst.cs
- HtmlTableRowCollection.cs
- BrowserCapabilitiesFactory.cs
- CannotUnloadAppDomainException.cs
- InstalledFontCollection.cs
- FixedTextSelectionProcessor.cs
- MarkerProperties.cs
- HtmlEncodedRawTextWriter.cs
- TextBreakpoint.cs
- ConfigWriter.cs
- InvokeMemberBinder.cs
- GenericXmlSecurityToken.cs
- BitmapEffectrendercontext.cs
- XmlElementAttribute.cs
- PriorityChain.cs
- ObsoleteAttribute.cs
- QilInvokeLateBound.cs
- ReflectionServiceProvider.cs
- Clock.cs
- TableRowGroup.cs
- InheritedPropertyDescriptor.cs
- CacheDependency.cs
- Quad.cs
- TemplatePropertyEntry.cs
- XMLUtil.cs
- TextModifierScope.cs
- SctClaimSerializer.cs
- SrgsToken.cs
- DBSchemaRow.cs
- CatalogPartChrome.cs
- ColumnResizeUndoUnit.cs
- PackageProperties.cs
- CachedTypeface.cs
- _ShellExpression.cs
- ConfigurationValidatorAttribute.cs
- SqlFunctions.cs
- AffineTransform3D.cs
- StylusEditingBehavior.cs
- FilteredReadOnlyMetadataCollection.cs
- DockAndAnchorLayout.cs
- RuntimeHandles.cs
- XPathNodeList.cs
- ResourceIDHelper.cs
- OperationAbortedException.cs
- DesignerOptionService.cs
- HtmlHead.cs
- InputBinding.cs
- HttpClientCertificate.cs
- RectValueSerializer.cs
- SoapClientProtocol.cs
- AutomationElementIdentifiers.cs
- SHA256CryptoServiceProvider.cs