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
- X509PeerCertificateElement.cs
- MexNamedPipeBindingElement.cs
- WaitHandleCannotBeOpenedException.cs
- AssemblyBuilder.cs
- ResourcePool.cs
- ResourceWriter.cs
- Int16Storage.cs
- WindowsUpDown.cs
- ScopelessEnumAttribute.cs
- SafeProcessHandle.cs
- BulletedList.cs
- GetLastErrorDetailsRequest.cs
- MouseWheelEventArgs.cs
- WebPartConnectionsCancelVerb.cs
- _TLSstream.cs
- EventLogEntryCollection.cs
- CustomErrorCollection.cs
- PipeConnection.cs
- PropertyCollection.cs
- StreamHelper.cs
- EncodingInfo.cs
- XPathNodeIterator.cs
- UserPreferenceChangedEventArgs.cs
- SymDocumentType.cs
- InitializationEventAttribute.cs
- MachineKeySection.cs
- ContentWrapperAttribute.cs
- TargetInvocationException.cs
- PointLight.cs
- BitmapPalettes.cs
- XmlValidatingReader.cs
- MultiSelectRootGridEntry.cs
- StickyNote.cs
- CacheDependency.cs
- ExpressionLexer.cs
- Rotation3D.cs
- BindingsCollection.cs
- Effect.cs
- XmlSchemaObjectTable.cs
- DecimalConstantAttribute.cs
- SoapHeader.cs
- TypeDescriptionProvider.cs
- SurrogateChar.cs
- IEnumerable.cs
- TypeDelegator.cs
- ECDsa.cs
- Button.cs
- Int32RectValueSerializer.cs
- GridViewDeletedEventArgs.cs
- GridEntry.cs
- PartialCachingAttribute.cs
- MeasureData.cs
- ObjectViewQueryResultData.cs
- HttpResponseHeader.cs
- DebugHandleTracker.cs
- InArgumentConverter.cs
- SupportsEventValidationAttribute.cs
- XmlChildNodes.cs
- TableLayoutPanelBehavior.cs
- NamespaceEmitter.cs
- DataGridCommandEventArgs.cs
- LinkButton.cs
- CipherData.cs
- ExpressionBinding.cs
- SchemaType.cs
- SynchronizationLockException.cs
- ClientRoleProvider.cs
- HttpHandlersSection.cs
- WebBrowserNavigatedEventHandler.cs
- TagMapCollection.cs
- ProcessModuleCollection.cs
- DbConnectionStringBuilder.cs
- CodeMethodInvokeExpression.cs
- ActivityScheduledQuery.cs
- WebContentFormatHelper.cs
- ClientProtocol.cs
- HtmlHistory.cs
- CompilerLocalReference.cs
- FamilyTypefaceCollection.cs
- Comparer.cs
- NonDualMessageSecurityOverHttpElement.cs
- TextSimpleMarkerProperties.cs
- ConnectionStringEditor.cs
- TrackingWorkflowEventArgs.cs
- RuleInfoComparer.cs
- DoubleAnimationClockResource.cs
- MarkupCompilePass2.cs
- StyleSelector.cs
- DesignerView.xaml.cs
- COM2ExtendedUITypeEditor.cs
- Int16.cs
- TextDecorations.cs
- ConfigXmlCDataSection.cs
- FixedSOMSemanticBox.cs
- Slider.cs
- PackageDigitalSignatureManager.cs
- ProcessManager.cs
- TextSelectionHighlightLayer.cs
- JpegBitmapEncoder.cs
- PassportAuthenticationModule.cs