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
- SslStream.cs
- TagNameToTypeMapper.cs
- MetadataCollection.cs
- IndependentAnimationStorage.cs
- RedistVersionInfo.cs
- MembershipUser.cs
- DesignerForm.cs
- ActivitiesCollection.cs
- ListViewSelectEventArgs.cs
- GPRECT.cs
- JoinSymbol.cs
- ObjectIDGenerator.cs
- messageonlyhwndwrapper.cs
- MarshalDirectiveException.cs
- ResourceDefaultValueAttribute.cs
- ToolStripSeparator.cs
- CurrentChangingEventManager.cs
- SecureStringHasher.cs
- FindCriteria.cs
- ProgressPage.cs
- CreateDataSourceDialog.cs
- Panel.cs
- WebServiceErrorEvent.cs
- ExtenderControl.cs
- WebFaultClientMessageInspector.cs
- DataTablePropertyDescriptor.cs
- CompilerState.cs
- XPathNodePointer.cs
- CqlParser.cs
- ValueTable.cs
- DialogDivider.cs
- FileChangesMonitor.cs
- CommandLibraryHelper.cs
- __ComObject.cs
- PropertyTab.cs
- ValueQuery.cs
- MasterPageCodeDomTreeGenerator.cs
- DataGridViewRowStateChangedEventArgs.cs
- ScopeElementCollection.cs
- LogSwitch.cs
- RadioButtonList.cs
- SurrogateEncoder.cs
- ThrowOnMultipleAssignment.cs
- FilteredAttributeCollection.cs
- NegotiateStream.cs
- StringOutput.cs
- NavigationWindowAutomationPeer.cs
- WebConfigurationHostFileChange.cs
- UidManager.cs
- RadioButtonRenderer.cs
- InvalidPropValue.cs
- TagMapInfo.cs
- PerfCounters.cs
- ColorBuilder.cs
- WebConvert.cs
- DataTableNewRowEvent.cs
- XmlSchemaChoice.cs
- LineProperties.cs
- Int16AnimationUsingKeyFrames.cs
- MessageQueueTransaction.cs
- PostBackTrigger.cs
- FirstMatchCodeGroup.cs
- ToolStripDropDownClosingEventArgs.cs
- BasicBrowserDialog.designer.cs
- GridViewDeleteEventArgs.cs
- ListManagerBindingsCollection.cs
- DescendantQuery.cs
- TemplateControlBuildProvider.cs
- OleDbRowUpdatingEvent.cs
- UniqueEventHelper.cs
- Margins.cs
- DebugView.cs
- SecurityPermission.cs
- SharedPersonalizationStateInfo.cs
- Literal.cs
- Vector3DAnimationBase.cs
- RegexWriter.cs
- ContentPosition.cs
- MemoryFailPoint.cs
- AppDomainProtocolHandler.cs
- CodePropertyReferenceExpression.cs
- HandoffBehavior.cs
- FlowDocument.cs
- DiscreteKeyFrames.cs
- Int16KeyFrameCollection.cs
- HMAC.cs
- Size3D.cs
- UnicastIPAddressInformationCollection.cs
- RenderData.cs
- CharKeyFrameCollection.cs
- PathFigureCollectionValueSerializer.cs
- BulletDecorator.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- NativeMethods.cs
- DesignerDataConnection.cs
- NamedObject.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- HttpHandlerAction.cs
- SiteMapNodeItem.cs
- HttpHandlersSection.cs