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
- ResourcePool.cs
- SchemaImporterExtension.cs
- BulletedListEventArgs.cs
- SqlBulkCopyColumnMapping.cs
- ReaderContextStackData.cs
- OwnerDrawPropertyBag.cs
- DataGridViewLinkColumn.cs
- Popup.cs
- DataGridViewCellParsingEventArgs.cs
- MenuItemStyle.cs
- WorkflowQueuingService.cs
- ComplexLine.cs
- PartitionResolver.cs
- CapabilitiesPattern.cs
- LiteralControl.cs
- StyleBamlTreeBuilder.cs
- SessionParameter.cs
- SourceInterpreter.cs
- ParseChildrenAsPropertiesAttribute.cs
- ASCIIEncoding.cs
- WebControlsSection.cs
- EntityWithChangeTrackerStrategy.cs
- WorkflowDesignerMessageFilter.cs
- Assembly.cs
- BCLDebug.cs
- WebException.cs
- SqlCacheDependencySection.cs
- Properties.cs
- XmlTypeMapping.cs
- SystemTcpConnection.cs
- UidManager.cs
- MimeMultiPart.cs
- ChineseLunisolarCalendar.cs
- SettingsAttributeDictionary.cs
- IgnoreSectionHandler.cs
- Frame.cs
- BooleanFacetDescriptionElement.cs
- CleanUpVirtualizedItemEventArgs.cs
- TextTreeInsertElementUndoUnit.cs
- TextProviderWrapper.cs
- Cursor.cs
- GraphicsContainer.cs
- SafeBitVector32.cs
- SessionStateItemCollection.cs
- GridItemProviderWrapper.cs
- ConfigUtil.cs
- ExpandSegmentCollection.cs
- PermissionRequestEvidence.cs
- XmlChildEnumerator.cs
- ClientTarget.cs
- HttpCacheVary.cs
- LinqMaximalSubtreeNominator.cs
- PackWebResponse.cs
- ItemChangedEventArgs.cs
- _NegoStream.cs
- InputScopeConverter.cs
- Pool.cs
- DataGridViewSelectedCellCollection.cs
- DataRowCollection.cs
- ActivityCodeDomReferenceService.cs
- CustomValidator.cs
- ReflectTypeDescriptionProvider.cs
- DesignColumnCollection.cs
- ShaperBuffers.cs
- SearchForVirtualItemEventArgs.cs
- BrowserCapabilitiesCompiler.cs
- HttpCacheVaryByContentEncodings.cs
- Convert.cs
- MexHttpsBindingCollectionElement.cs
- CacheVirtualItemsEvent.cs
- SQLByteStorage.cs
- ProvidePropertyAttribute.cs
- MemoryPressure.cs
- IndentTextWriter.cs
- FileClassifier.cs
- EventLogInformation.cs
- Boolean.cs
- TextBlock.cs
- ColumnTypeConverter.cs
- EventLogInternal.cs
- TriggerAction.cs
- ByteAnimation.cs
- SqlColumnizer.cs
- RewritingProcessor.cs
- dataobject.cs
- EventTask.cs
- AnimatedTypeHelpers.cs
- UrlAuthFailureHandler.cs
- BuildProvider.cs
- ValidationRule.cs
- LogicalExpr.cs
- ListItem.cs
- CorrelationKey.cs
- HttpBrowserCapabilitiesWrapper.cs
- MsmqOutputChannel.cs
- HttpTransportElement.cs
- TextServicesCompartment.cs
- WebCategoryAttribute.cs
- CodeMethodReturnStatement.cs
- InputLanguageEventArgs.cs