Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Selectors / SecurityTokenAuthenticator.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmiEventSink_DeferedProcessing.cs
- Label.cs
- OleDbDataReader.cs
- InfoCardSymmetricAlgorithm.cs
- FixedSOMTable.cs
- ImageFormatConverter.cs
- DataGridViewSortCompareEventArgs.cs
- ISessionStateStore.cs
- _Win32.cs
- FileDialogCustomPlace.cs
- TableCellAutomationPeer.cs
- SoapCodeExporter.cs
- FontStretches.cs
- ProtectedConfiguration.cs
- BitmapData.cs
- ReachDocumentSequenceSerializer.cs
- CrossSiteScriptingValidation.cs
- RegexCharClass.cs
- TextBoxView.cs
- FieldBuilder.cs
- DataGridViewImageColumn.cs
- BCryptSafeHandles.cs
- Model3D.cs
- ScaleTransform.cs
- UnsafeNetInfoNativeMethods.cs
- NameSpaceEvent.cs
- Matrix3DConverter.cs
- WebPartCancelEventArgs.cs
- TokenFactoryCredential.cs
- PresentationTraceSources.cs
- SurrogateEncoder.cs
- BlockUIContainer.cs
- ErrorLog.cs
- SiteMapSection.cs
- HttpRequestBase.cs
- Rectangle.cs
- ControlBuilderAttribute.cs
- SmtpNetworkElement.cs
- EncoderFallback.cs
- EntityDataSourceWrapper.cs
- GenericWebPart.cs
- RangeContentEnumerator.cs
- TreeViewImageGenerator.cs
- PackageFilter.cs
- HwndStylusInputProvider.cs
- Missing.cs
- MultiBindingExpression.cs
- DBConnectionString.cs
- LinqDataSourceDeleteEventArgs.cs
- _NetRes.cs
- SmiSettersStream.cs
- StatusStrip.cs
- TargetControlTypeAttribute.cs
- CodeBlockBuilder.cs
- _LoggingObject.cs
- MasterPageBuildProvider.cs
- IndentedWriter.cs
- VisualCollection.cs
- BufferAllocator.cs
- DocumentViewerAutomationPeer.cs
- ImageSourceValueSerializer.cs
- Environment.cs
- WebPartConnectionsCancelVerb.cs
- CodeMemberProperty.cs
- HotSpotCollectionEditor.cs
- SHA512Managed.cs
- PeerNearMe.cs
- DeflateStream.cs
- BitArray.cs
- RepeaterItemEventArgs.cs
- MemberPath.cs
- Identifier.cs
- DoubleAnimationUsingKeyFrames.cs
- COM2ExtendedTypeConverter.cs
- Int16.cs
- CompModSwitches.cs
- PingReply.cs
- ChineseLunisolarCalendar.cs
- TextAction.cs
- OleDbConnectionInternal.cs
- HMACSHA512.cs
- UrlPath.cs
- Types.cs
- WeakEventTable.cs
- BoolExpr.cs
- HttpListenerContext.cs
- MenuRendererClassic.cs
- PixelShader.cs
- PagesSection.cs
- HtmlInputImage.cs
- XMLUtil.cs
- Parameter.cs
- SqlDataSourceWizardForm.cs
- ConfigurationConverterBase.cs
- Operand.cs
- PrintPageEvent.cs
- returneventsaver.cs
- GlobalProxySelection.cs
- MiniParameterInfo.cs
- ellipse.cs