//----------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- namespace System.IdentityModel.Tokens { using System; using System.Collections.ObjectModel; /// /// Represents the Evidence element specified in [Saml2Core, 2.7.4.3]. /// /// /// Contains one or more assertions or assertion references that the SAML /// authority relied on in issuing the authorization decision. /// [Saml2Core, 2.7.4.3] /// public class Saml2Evidence { private Collection assertionIdReferences = new Collection(); private Collection assertions = new Collection(); private AbsoluteUriCollection assertionUriReferences = new AbsoluteUriCollection(); /// /// Initializes a new instance of class. /// public Saml2Evidence() { } /// /// Initializes a new instance of class from a . /// /// containing the evidence. public Saml2Evidence(Saml2Assertion assertion) { if (null == assertion) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("assertion"); } this.assertions.Add(assertion); } /// /// Initializes a new instance of class from a . /// /// containing the evidence. public Saml2Evidence(Saml2Id idReference) { if (null == idReference) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("idReference"); } this.assertionIdReferences.Add(idReference); } /// /// Initializes a new instance of class from a . /// /// containing the evidence. public Saml2Evidence(Uri uriReference) { if (null == uriReference) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("uriReference"); } this.assertionUriReferences.Add(uriReference); } /// /// Gets a collection of for use by the . /// public Collection AssertionIdReferences { get { return this.assertionIdReferences; } } /// /// Gets a collection of for use by the . /// public Collection Assertions { get { return this.assertions; } } /// /// Gets a collection of for use by the . /// public Collection AssertionUriReferences { get { return this.assertionUriReferences; } } } }