//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ namespace System.IdentityModel { using System; using System.Collections.Generic; using System.IdentityModel.Tokens; /// /// Defines one class which contains all the relying party related information. /// This class is not thread safe. /// public class Scope { string _appliesToAddress; string _replyToAddress; EncryptingCredentials _encryptingCredentials; SigningCredentials _signingCredentials; bool _symmetricKeyEncryptionRequired = true; bool _tokenEncryptionRequired = true; Dictionary _properties = new Dictionary(); // for any custom data /// /// Initializes an instance of /// public Scope() : this(null, null, null) { } /// /// Initializes an instance of /// /// The appliesTo address of the relying party. public Scope(string appliesToAddress) : this(appliesToAddress, null, null) { } /// /// Initializes an instance of /// /// The appliesTo address of the relying party. /// The signing credentials for the relying party. public Scope(string appliesToAddress, SigningCredentials signingCredentials) : this(appliesToAddress, signingCredentials, null) { } /// /// Initializes an instance of /// /// The appliesTo address of the relying party. /// The encrypting credentials for the relying party. public Scope(string appliesToAddress, EncryptingCredentials encryptingCredentials) : this(appliesToAddress, null, encryptingCredentials) { } /// /// Initializes an instance of /// /// The appliesTo address of the relying party. /// The signing credentials for the relying party. /// The encrypting credentials for the relying party. public Scope(string appliesToAddress, SigningCredentials signingCredentials, EncryptingCredentials encryptingCredentials) { _appliesToAddress = appliesToAddress; _signingCredentials = signingCredentials; _encryptingCredentials = encryptingCredentials; } /// /// Gets or sets the appliesTo address of the relying party. /// public virtual string AppliesToAddress { get { return _appliesToAddress; } set { _appliesToAddress = value; } } /// /// Gets or sets the encrypting credentials. /// public virtual EncryptingCredentials EncryptingCredentials { get { return _encryptingCredentials; } set { _encryptingCredentials = value; } } /// /// Gets or sets the replyTo address of the relying party. /// public virtual string ReplyToAddress { get { return _replyToAddress; } set { _replyToAddress = value; } } /// /// Gets or sets the SigningCredentials for the relying party. /// public virtual SigningCredentials SigningCredentials { get { return _signingCredentials; } set { _signingCredentials = value; } } /// /// Gets or sets the property which determines if issued symmetric keys must /// be encrypted by . /// public virtual bool SymmetricKeyEncryptionRequired { get { return _symmetricKeyEncryptionRequired; } set { _symmetricKeyEncryptionRequired = value; } } /// /// Gets or sets the property which determines if issued security tokens must /// be encrypted by . /// public virtual bool TokenEncryptionRequired { get { return _tokenEncryptionRequired; } set { _tokenEncryptionRequired = value; } } /// /// Gets the properties bag to extend the object. /// public virtual Dictionary Properties { get { return _properties; } } } }