Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / IdentityModel / System / IdentityModel / Tokens / SamlAssertionKeyIdentifierClause.cs / 1305376 / SamlAssertionKeyIdentifierClause.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Globalization; public class SamlAssertionKeyIdentifierClause : SecurityKeyIdentifierClause { readonly string assertionId; readonly string valueType; readonly string tokenTypeUri; readonly string binding; readonly string location; readonly string authorityKind; public SamlAssertionKeyIdentifierClause(string assertionId) : this(assertionId, null, 0) { } public SamlAssertionKeyIdentifierClause(string assertionId, byte[] derivationNonce, int derivationLength) : this(assertionId, derivationNonce, derivationLength, null, null, null, null, null) { } internal SamlAssertionKeyIdentifierClause(string assertionId, byte[] derivationNonce, int derivationLength, string valueType, string tokenTypeUri, string binding, string location, string authorityKind) : base(null, derivationNonce, derivationLength) { if (assertionId == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("assertionId"); } this.assertionId = assertionId; this.valueType = valueType; this.tokenTypeUri = tokenTypeUri; this.binding = binding; this.location = location; this.authorityKind = authorityKind; } public string AssertionId { get { return this.assertionId; } } internal string TokenTypeUri { get { return this.tokenTypeUri; } } internal string ValueType { get { return this.valueType; } } internal string Binding { get { return this.binding; } } internal string Location { get { return this.location; } } internal string AuthorityKind { get { return this.authorityKind; } } public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) { SamlAssertionKeyIdentifierClause that = keyIdentifierClause as SamlAssertionKeyIdentifierClause; // PreSharp Bug: Parameter 'that' to this public method must be validated: A null-dereference can occur here. #pragma warning suppress 56506 return ReferenceEquals(this, that) || (that != null && that.Matches(this.assertionId)); } public bool Matches(string assertionId) { return this.assertionId == assertionId; } public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "SamlAssertionKeyIdentifierClause(AssertionId = '{0}')", this.AssertionId); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System.Globalization; public class SamlAssertionKeyIdentifierClause : SecurityKeyIdentifierClause { readonly string assertionId; readonly string valueType; readonly string tokenTypeUri; readonly string binding; readonly string location; readonly string authorityKind; public SamlAssertionKeyIdentifierClause(string assertionId) : this(assertionId, null, 0) { } public SamlAssertionKeyIdentifierClause(string assertionId, byte[] derivationNonce, int derivationLength) : this(assertionId, derivationNonce, derivationLength, null, null, null, null, null) { } internal SamlAssertionKeyIdentifierClause(string assertionId, byte[] derivationNonce, int derivationLength, string valueType, string tokenTypeUri, string binding, string location, string authorityKind) : base(null, derivationNonce, derivationLength) { if (assertionId == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("assertionId"); } this.assertionId = assertionId; this.valueType = valueType; this.tokenTypeUri = tokenTypeUri; this.binding = binding; this.location = location; this.authorityKind = authorityKind; } public string AssertionId { get { return this.assertionId; } } internal string TokenTypeUri { get { return this.tokenTypeUri; } } internal string ValueType { get { return this.valueType; } } internal string Binding { get { return this.binding; } } internal string Location { get { return this.location; } } internal string AuthorityKind { get { return this.authorityKind; } } public override bool Matches(SecurityKeyIdentifierClause keyIdentifierClause) { SamlAssertionKeyIdentifierClause that = keyIdentifierClause as SamlAssertionKeyIdentifierClause; // PreSharp Bug: Parameter 'that' to this public method must be validated: A null-dereference can occur here. #pragma warning suppress 56506 return ReferenceEquals(this, that) || (that != null && that.Matches(this.assertionId)); } public bool Matches(string assertionId) { return this.assertionId == assertionId; } public override string ToString() { return string.Format(CultureInfo.InvariantCulture, "SamlAssertionKeyIdentifierClause(AssertionId = '{0}')", this.AssertionId); } } } // 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
- WhileDesigner.cs
- VerticalAlignConverter.cs
- DBCommand.cs
- NotifyParentPropertyAttribute.cs
- WorkflowServiceNamespace.cs
- LogSwitch.cs
- ArgIterator.cs
- WindowsFormsHost.cs
- BlurEffect.cs
- VoiceInfo.cs
- FontFamily.cs
- RelationshipSet.cs
- Int16Storage.cs
- CompositeControlDesigner.cs
- Point.cs
- PerfService.cs
- MD5CryptoServiceProvider.cs
- NumberSubstitution.cs
- BitmapCodecInfo.cs
- FormsAuthenticationConfiguration.cs
- DataRelation.cs
- FactoryMaker.cs
- XamlTemplateSerializer.cs
- FormsAuthenticationConfiguration.cs
- NotifyCollectionChangedEventArgs.cs
- Debugger.cs
- CodeTypeDeclarationCollection.cs
- MobileUserControlDesigner.cs
- BitmapFrameEncode.cs
- BasicExpandProvider.cs
- XMLUtil.cs
- ILGenerator.cs
- ServiceAuthorizationManager.cs
- DataViewSettingCollection.cs
- CommandValueSerializer.cs
- JournalNavigationScope.cs
- CodeTypeReference.cs
- CallSiteOps.cs
- WeakEventTable.cs
- PersonalizationProviderCollection.cs
- Tuple.cs
- EndOfStreamException.cs
- WmlValidatorAdapter.cs
- RoleService.cs
- CompiledRegexRunnerFactory.cs
- TypedTableBase.cs
- SchemaMapping.cs
- GeneralEndpointIdentity.cs
- TransactionScope.cs
- AuthenticationService.cs
- TreeViewEvent.cs
- SoapIgnoreAttribute.cs
- FreezableCollection.cs
- XmlSerializationWriter.cs
- TypeKeyValue.cs
- StrongName.cs
- DependencySource.cs
- RelationshipEntry.cs
- JavaScriptSerializer.cs
- FontFamilyIdentifier.cs
- UnsafeNativeMethods.cs
- TextureBrush.cs
- AdapterUtil.cs
- DataGridViewIntLinkedList.cs
- OleDbParameterCollection.cs
- HighlightVisual.cs
- TimeZoneNotFoundException.cs
- XPathNodeList.cs
- PhoneCall.cs
- InfoCardProofToken.cs
- XmlAggregates.cs
- WindowsFormsHostAutomationPeer.cs
- TransportChannelFactory.cs
- SplitContainerDesigner.cs
- DateTimeConverter.cs
- SerializationInfo.cs
- NullExtension.cs
- Int16Animation.cs
- RC2.cs
- ADMembershipProvider.cs
- RadioButtonPopupAdapter.cs
- StateDesigner.Layouts.cs
- SafeArrayTypeMismatchException.cs
- JoinCqlBlock.cs
- ProcessStartInfo.cs
- RegexCompilationInfo.cs
- SafeNativeMethods.cs
- _SingleItemRequestCache.cs
- CacheRequest.cs
- TextTreePropertyUndoUnit.cs
- XmlILIndex.cs
- StrongNamePublicKeyBlob.cs
- AppDomainUnloadedException.cs
- SkewTransform.cs
- TextAutomationPeer.cs
- CodeArrayIndexerExpression.cs
- GeometryModel3D.cs
- Hyperlink.cs
- BamlTreeUpdater.cs
- FixUp.cs