/// <summary> /// Initializes a new instance of the <see cref="SecurityContext" /> class. /// </summary> protected SecurityContext(SecurityCredential credential) { Credential = credential; _safeContextHandle = new SafeContextHandle(); _authorityName = new Lazy <string>(() => _safeContextHandle.GetAuthorityName()); _contextUserName = new Lazy <string>(() => _safeContextHandle.GetContextUserName()); }
/// <summary> /// Initializes a new instance of the <see cref="ClientSecurityContext" /> class. /// </summary> /// <param name="credential">The security credential to use for authentication.</param> /// <param name="serverPrinciple">The principle name of the server to connect to, or null for any.</param> /// <param name="requestedAttributes">The desired properties of the context once it is established.</param> public ClientSecurityContext(SecurityCredential credential, string serverPrinciple, SecurityContextAttributes requestedAttributes) : base(credential) { _serverPrinciple = serverPrinciple; _requestedAttributes = requestedAttributes; }
/// <summary> /// Initializes a new instance of the <see cref="ServerSecurityContext" /> class. /// </summary> /// <param name="credential">The security credential to use for authentication.</param> /// <param name="requestedAttributes">The desired properties of the context once it is established.</param> public ServerSecurityContext(SecurityCredential credential, SecurityContextAttributes requestedAttributes) : base(credential) { _requestedAttributes = requestedAttributes; }