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
- ListDictionary.cs
- AffineTransform3D.cs
- Char.cs
- WindowsTitleBar.cs
- TextDpi.cs
- ObjectHandle.cs
- ModuleElement.cs
- ListViewItem.cs
- StyleSelector.cs
- CodeParameterDeclarationExpression.cs
- DesignerDataView.cs
- NonceCache.cs
- InteropBitmapSource.cs
- XmlAnyElementAttribute.cs
- AsmxEndpointPickerExtension.cs
- SecurityTokenRequirement.cs
- CustomTypeDescriptor.cs
- FormViewInsertedEventArgs.cs
- IsolatedStorageException.cs
- ArrayWithOffset.cs
- EventLogInformation.cs
- MinMaxParagraphWidth.cs
- BezierSegment.cs
- DataGrid.cs
- XmlQuerySequence.cs
- MouseGestureValueSerializer.cs
- CryptoApi.cs
- ParameterBuilder.cs
- XmlToDatasetMap.cs
- WebAdminConfigurationHelper.cs
- ContextDataSourceView.cs
- StreamInfo.cs
- TransactionOptions.cs
- EdmRelationshipRoleAttribute.cs
- FlowPanelDesigner.cs
- TypePresenter.xaml.cs
- Simplifier.cs
- DesigntimeLicenseContextSerializer.cs
- CultureTable.cs
- SafeLibraryHandle.cs
- HtmlInputControl.cs
- TextPenaltyModule.cs
- DesignerEventService.cs
- ICspAsymmetricAlgorithm.cs
- FormViewDesigner.cs
- AssertHelper.cs
- TrackingServices.cs
- RenameRuleObjectDialog.Designer.cs
- Triplet.cs
- StructuralCache.cs
- peernodeimplementation.cs
- MaskDesignerDialog.cs
- InputMethodStateTypeInfo.cs
- MembershipValidatePasswordEventArgs.cs
- HotSpotCollection.cs
- TraceSection.cs
- CodeTypeMember.cs
- _SafeNetHandles.cs
- MarshalDirectiveException.cs
- SrgsText.cs
- Process.cs
- Int16KeyFrameCollection.cs
- MarginsConverter.cs
- ComponentDispatcher.cs
- AuthenticationModulesSection.cs
- StrongNamePublicKeyBlob.cs
- ListControlConvertEventArgs.cs
- RawKeyboardInputReport.cs
- Bidi.cs
- SpecularMaterial.cs
- webclient.cs
- ParentUndoUnit.cs
- MaskInputRejectedEventArgs.cs
- ApplicationBuildProvider.cs
- SortQuery.cs
- RoutedEvent.cs
- Gdiplus.cs
- precedingsibling.cs
- PageThemeBuildProvider.cs
- TypeReference.cs
- Merger.cs
- ListBoxItemAutomationPeer.cs
- XPathSelfQuery.cs
- MatrixKeyFrameCollection.cs
- VisualStyleRenderer.cs
- SizeAnimationUsingKeyFrames.cs
- DataGridPagerStyle.cs
- ContextMarshalException.cs
- BatchWriter.cs
- OracleEncoding.cs
- FontUnit.cs
- OleServicesContext.cs
- XmlLanguageConverter.cs
- RealProxy.cs
- XmlSchemaAnyAttribute.cs
- HandleCollector.cs
- ComponentChangedEvent.cs
- CanonicalXml.cs
- RemoteWebConfigurationHostStream.cs
- XPathMessageFilterElementCollection.cs