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
- XsdBuilder.cs
- SaveFileDialog.cs
- StorageScalarPropertyMapping.cs
- ZoomComboBox.cs
- DeferredTextReference.cs
- DependencyPropertyAttribute.cs
- RawStylusInput.cs
- DesignerAdapterUtil.cs
- TypedColumnHandler.cs
- InternalDuplexChannelFactory.cs
- PassportAuthentication.cs
- PtsHelper.cs
- TabOrder.cs
- CheckoutException.cs
- XmlSchemaElement.cs
- SqlTrackingQuery.cs
- HtmlProps.cs
- InstanceLockException.cs
- EmbeddedMailObject.cs
- ImageList.cs
- pingexception.cs
- MouseDevice.cs
- XAMLParseException.cs
- CustomTypeDescriptor.cs
- SqlServices.cs
- ContextDataSourceView.cs
- IsolatedStorageException.cs
- TextServicesCompartmentContext.cs
- XmlQualifiedName.cs
- ClrPerspective.cs
- XmlILAnnotation.cs
- DoubleLinkListEnumerator.cs
- HttpCapabilitiesBase.cs
- UshortList2.cs
- SchemaImporterExtensionElement.cs
- EventWaitHandle.cs
- IChannel.cs
- MetadataHelper.cs
- ThicknessAnimation.cs
- WebZone.cs
- Row.cs
- XmlHierarchyData.cs
- BitmapScalingModeValidation.cs
- ZipIOCentralDirectoryFileHeader.cs
- TextServicesLoader.cs
- ToolStripItemRenderEventArgs.cs
- LocalizabilityAttribute.cs
- DelimitedListTraceListener.cs
- RoutedUICommand.cs
- PerformanceCounterPermissionAttribute.cs
- NetworkInformationPermission.cs
- DropShadowBitmapEffect.cs
- HttpResponseHeader.cs
- TextFormatterContext.cs
- CompositionTarget.cs
- ConfigurationValidatorBase.cs
- WinHttpWebProxyFinder.cs
- IIS7WorkerRequest.cs
- LinearKeyFrames.cs
- SafeHandles.cs
- InfoCardTrace.cs
- TripleDES.cs
- CompositeControl.cs
- AttributeAction.cs
- EncoderNLS.cs
- SqlDataSourceFilteringEventArgs.cs
- AttributeQuery.cs
- SqlDataSourceCommandEventArgs.cs
- DrawingAttributeSerializer.cs
- Condition.cs
- ProxyElement.cs
- BasicBrowserDialog.cs
- Funcletizer.cs
- LoginCancelEventArgs.cs
- ITreeGenerator.cs
- SqlProcedureAttribute.cs
- ToolStripOverflowButton.cs
- ToolboxCategory.cs
- util.cs
- X509RecipientCertificateServiceElement.cs
- WeakHashtable.cs
- HtmlInputPassword.cs
- XPathScanner.cs
- HotSpotCollection.cs
- DocumentOrderComparer.cs
- FormViewAutoFormat.cs
- EventManager.cs
- HttpRequestCacheValidator.cs
- RijndaelManagedTransform.cs
- StagingAreaInputItem.cs
- ServiceOperationParameter.cs
- LoadedOrUnloadedOperation.cs
- SourceFileBuildProvider.cs
- PageRouteHandler.cs
- TrackingProfileSerializer.cs
- InternalSafeNativeMethods.cs
- HostUtils.cs
- RequestCachePolicy.cs
- WeakReference.cs
- PromptBuilder.cs