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
- HttpApplicationFactory.cs
- SQLBinaryStorage.cs
- WebContext.cs
- KeyGestureValueSerializer.cs
- StyleModeStack.cs
- CompilationUtil.cs
- DbDeleteCommandTree.cs
- WebColorConverter.cs
- TextParaClient.cs
- SortKey.cs
- UIPermission.cs
- IDispatchConstantAttribute.cs
- FlowLayoutSettings.cs
- BatchWriter.cs
- MouseActionConverter.cs
- FontFamily.cs
- BrushConverter.cs
- ISFClipboardData.cs
- FileInfo.cs
- SHA512.cs
- RequestQueue.cs
- ContentIterators.cs
- FieldNameLookup.cs
- PolicyUtility.cs
- CodeLinePragma.cs
- DataTableClearEvent.cs
- Oci.cs
- Content.cs
- Aggregates.cs
- XmlNamespaceManager.cs
- ArrayElementGridEntry.cs
- SerializationFieldInfo.cs
- CharEnumerator.cs
- Calendar.cs
- GridItemCollection.cs
- _SslStream.cs
- Invariant.cs
- CorePropertiesFilter.cs
- CrossContextChannel.cs
- RsaSecurityTokenParameters.cs
- ListViewItemMouseHoverEvent.cs
- FloaterBaseParaClient.cs
- AddingNewEventArgs.cs
- PartialList.cs
- SimpleBitVector32.cs
- Path.cs
- BrowserDefinitionCollection.cs
- SoapInteropTypes.cs
- AtlasWeb.Designer.cs
- XmlTextEncoder.cs
- XmlIlTypeHelper.cs
- GroupLabel.cs
- TaskFormBase.cs
- UserControlParser.cs
- JapaneseLunisolarCalendar.cs
- DefaultPropertiesToSend.cs
- Triplet.cs
- XslTransform.cs
- arc.cs
- DataGridViewLinkColumn.cs
- SiteMapNode.cs
- Pool.cs
- OptimalTextSource.cs
- ReadOnlyMetadataCollection.cs
- BrowsableAttribute.cs
- ZoneIdentityPermission.cs
- SqlProviderManifest.cs
- IncrementalReadDecoders.cs
- RequestCacheValidator.cs
- AsyncDataRequest.cs
- Buffer.cs
- DataBinding.cs
- StrongName.cs
- ActivityScheduledQuery.cs
- XsltContext.cs
- StringAnimationBase.cs
- Line.cs
- HyperLink.cs
- ConfigurationException.cs
- RoleGroup.cs
- RelationshipManager.cs
- CustomError.cs
- XmlSchemaAttribute.cs
- SystemGatewayIPAddressInformation.cs
- WebPartDescriptionCollection.cs
- ArraySortHelper.cs
- cookiecollection.cs
- SerializationInfo.cs
- basevalidator.cs
- InstanceDataCollection.cs
- SystemUdpStatistics.cs
- FixedStringLookup.cs
- ChangePasswordDesigner.cs
- AliasedSlot.cs
- FragmentQueryProcessor.cs
- MemoryRecordBuffer.cs
- Knowncolors.cs
- TriState.cs
- documentsequencetextpointer.cs
- WebBrowserUriTypeConverter.cs