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
- DataGridClipboardHelper.cs
- Margins.cs
- sqlser.cs
- ValidatedControlConverter.cs
- EntityKey.cs
- _ConnectionGroup.cs
- fixedPageContentExtractor.cs
- ControlEvent.cs
- TextLine.cs
- ToolStripDropDownClosingEventArgs.cs
- HttpDictionary.cs
- CultureTableRecord.cs
- DbConnectionStringCommon.cs
- StateDesigner.cs
- PropertyConverter.cs
- TraceInternal.cs
- FilteredReadOnlyMetadataCollection.cs
- ListChangedEventArgs.cs
- MarkedHighlightComponent.cs
- LambdaCompiler.Address.cs
- MailDefinition.cs
- objectresult_tresulttype.cs
- EraserBehavior.cs
- ParameterCollection.cs
- HttpServerVarsCollection.cs
- TempEnvironment.cs
- EventLogPropertySelector.cs
- TextMessageEncodingBindingElement.cs
- BuildProvider.cs
- PointKeyFrameCollection.cs
- DbProviderFactory.cs
- GridViewDeleteEventArgs.cs
- Condition.cs
- DesignerValidatorAdapter.cs
- EntryPointNotFoundException.cs
- ItemsPanelTemplate.cs
- EventProviderWriter.cs
- HandlerMappingMemo.cs
- AutomationTextAttribute.cs
- BamlLocalizableResourceKey.cs
- GenericEnumerator.cs
- StyleBamlTreeBuilder.cs
- EventData.cs
- DataObjectCopyingEventArgs.cs
- FacetChecker.cs
- DocumentApplicationJournalEntry.cs
- COM2PropertyBuilderUITypeEditor.cs
- MultipartContentParser.cs
- EtwTrace.cs
- DataServiceQueryContinuation.cs
- EncryptedPackage.cs
- SlipBehavior.cs
- ApplicationException.cs
- DataConnectionHelper.cs
- TimeoutException.cs
- XmlILModule.cs
- StateMachineTimers.cs
- PeerPresenceInfo.cs
- PersistenceTypeAttribute.cs
- DelegatedStream.cs
- DataRowComparer.cs
- ApplicationCommands.cs
- ActivityPreviewDesigner.cs
- LineBreak.cs
- ResourceDescriptionAttribute.cs
- BamlRecordReader.cs
- AndCondition.cs
- SplitterPanel.cs
- SystemWebExtensionsSectionGroup.cs
- Point4D.cs
- DnsCache.cs
- TextBoxDesigner.cs
- Translator.cs
- ExpressionConverter.cs
- ThreadExceptionEvent.cs
- FontStyles.cs
- TextParaClient.cs
- WindowsStreamSecurityBindingElement.cs
- RangeValueProviderWrapper.cs
- LineServicesCallbacks.cs
- PostBackOptions.cs
- InvokePattern.cs
- SecurityKeyEntropyMode.cs
- Evaluator.cs
- XmlFormatReaderGenerator.cs
- AffineTransform3D.cs
- SingleAnimationUsingKeyFrames.cs
- DataKeyCollection.cs
- SafeReversePInvokeHandle.cs
- ValidationSummary.cs
- MenuItemStyle.cs
- KnowledgeBase.cs
- DataKey.cs
- EncoderParameter.cs
- ProtocolsConfigurationEntry.cs
- CaseInsensitiveHashCodeProvider.cs
- WindowsIdentity.cs
- StateMachineDesignerPaint.cs
- CacheHelper.cs
- DataGridItem.cs