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
- Block.cs
- CroppedBitmap.cs
- ComEventsHelper.cs
- Typeface.cs
- PowerStatus.cs
- _NegotiateClient.cs
- ColumnHeader.cs
- DefaultShape.cs
- CollectionEditorDialog.cs
- SelectionChangedEventArgs.cs
- AddingNewEventArgs.cs
- ProgramNode.cs
- StorageEntitySetMapping.cs
- PackWebResponse.cs
- CollectionChangeEventArgs.cs
- NameSpaceExtractor.cs
- __ConsoleStream.cs
- SmtpFailedRecipientsException.cs
- EnumerableCollectionView.cs
- CodeExporter.cs
- AssemblyBuilder.cs
- NgenServicingAttributes.cs
- SqlDataSourceTableQuery.cs
- Button.cs
- IndexedWhereQueryOperator.cs
- InertiaRotationBehavior.cs
- XPathAncestorIterator.cs
- RbTree.cs
- DataServiceHostWrapper.cs
- SettingsPropertyIsReadOnlyException.cs
- TakeQueryOptionExpression.cs
- TemplateControlParser.cs
- Input.cs
- DataFormats.cs
- Error.cs
- RowTypeElement.cs
- MetadataArtifactLoaderCompositeResource.cs
- ReaderOutput.cs
- CompiledIdentityConstraint.cs
- OleDbDataAdapter.cs
- SQLInt32Storage.cs
- ASCIIEncoding.cs
- RenderData.cs
- PixelFormatConverter.cs
- TrustSection.cs
- DtdParser.cs
- OneOfElement.cs
- TextPenaltyModule.cs
- SynchronizedDispatch.cs
- Timer.cs
- ErrorEventArgs.cs
- MarkupObject.cs
- StylusButton.cs
- GetWinFXPath.cs
- Rotation3DAnimation.cs
- OwnerDrawPropertyBag.cs
- SqlPersonalizationProvider.cs
- BitmapEffectInputData.cs
- ObjectViewQueryResultData.cs
- DbConnectionOptions.cs
- IOException.cs
- StructuralType.cs
- PageContentCollection.cs
- ClientScriptManager.cs
- ReadContentAsBinaryHelper.cs
- Constraint.cs
- DataColumnMapping.cs
- XPathException.cs
- TimeZone.cs
- BaseParagraph.cs
- MultipleViewPatternIdentifiers.cs
- BuildResult.cs
- Transactions.cs
- EntityWrapper.cs
- InternalControlCollection.cs
- EntityTypeEmitter.cs
- PublisherIdentityPermission.cs
- QualificationDataItem.cs
- ZipIOLocalFileDataDescriptor.cs
- ColumnBinding.cs
- ListItemParagraph.cs
- ObjectStateManager.cs
- DelegatingHeader.cs
- SystemDiagnosticsSection.cs
- ContextMenuAutomationPeer.cs
- PackageStore.cs
- EncryptedType.cs
- __ConsoleStream.cs
- ToolStripItemRenderEventArgs.cs
- _SafeNetHandles.cs
- SafeBitVector32.cs
- XmlReader.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- TraceContext.cs
- sqlstateclientmanager.cs
- ReflectPropertyDescriptor.cs
- PeerNameRecord.cs
- WindowsSspiNegotiation.cs
- DictionaryEntry.cs
- MultitargetUtil.cs