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
- XmlTextReaderImplHelpers.cs
- DataGridTemplateColumn.cs
- ArraySet.cs
- XslUrlEditor.cs
- SortDescription.cs
- ObjectSet.cs
- SettingsPropertyValue.cs
- QilTernary.cs
- WindowProviderWrapper.cs
- XmlILTrace.cs
- TraceSection.cs
- AttachInfo.cs
- SqlClientWrapperSmiStreamChars.cs
- CacheAxisQuery.cs
- BeginStoryboard.cs
- SynchronizingStream.cs
- DecodeHelper.cs
- KeyEvent.cs
- PathGeometry.cs
- SHA384.cs
- SmtpCommands.cs
- NodeLabelEditEvent.cs
- TypeResolver.cs
- ScaleTransform.cs
- ElementMarkupObject.cs
- HttpResponseInternalWrapper.cs
- FormsAuthenticationCredentials.cs
- EntityDescriptor.cs
- GuidTagList.cs
- MgmtResManager.cs
- WhereQueryOperator.cs
- HttpRuntime.cs
- TextPatternIdentifiers.cs
- LogSwitch.cs
- GridSplitterAutomationPeer.cs
- HitTestParameters.cs
- PackageProperties.cs
- Utils.cs
- TextServicesDisplayAttribute.cs
- ArrangedElementCollection.cs
- HandleRef.cs
- XpsPackagingPolicy.cs
- ManifestSignedXml.cs
- TypeUtil.cs
- ActivationArguments.cs
- UserPreferenceChangedEventArgs.cs
- PerformanceCounterCategory.cs
- ProtocolViolationException.cs
- ObjectDataSourceMethodEventArgs.cs
- FontSourceCollection.cs
- SQLBinaryStorage.cs
- SoapAttributeOverrides.cs
- WebControl.cs
- TextRangeProviderWrapper.cs
- CornerRadiusConverter.cs
- Literal.cs
- SqlVersion.cs
- ToolStripItemEventArgs.cs
- TextTreeUndoUnit.cs
- RangeValidator.cs
- InputProcessorProfilesLoader.cs
- CircleHotSpot.cs
- WebPartRestoreVerb.cs
- DiscoveryMessageSequence.cs
- M3DUtil.cs
- SmtpLoginAuthenticationModule.cs
- AnimationClockResource.cs
- DataGridViewRowConverter.cs
- FormatControl.cs
- WSHttpBindingBaseElement.cs
- ContentValidator.cs
- ProfileSettings.cs
- validation.cs
- Button.cs
- SmtpNetworkElement.cs
- WebConfigurationFileMap.cs
- TypeSource.cs
- SystemIPAddressInformation.cs
- MouseGesture.cs
- MailMessage.cs
- TextEffectResolver.cs
- XmlAttributeHolder.cs
- SelectQueryOperator.cs
- ActivationServices.cs
- CompiledIdentityConstraint.cs
- RectangleF.cs
- UInt16.cs
- BitmapImage.cs
- MenuTracker.cs
- XmlMembersMapping.cs
- UnaryOperationBinder.cs
- DataGridCellClipboardEventArgs.cs
- TimeoutValidationAttribute.cs
- RawStylusSystemGestureInputReport.cs
- BamlMapTable.cs
- SoapElementAttribute.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- ImageMap.cs
- ExpressionCopier.cs
- DataGridViewIntLinkedList.cs