示例#1
0
        public Credentials(AuthenticationTokenType authenticationTokenType, string token)
        {
            Ensure.ArgumentNotNull(nameof(authenticationTokenType), authenticationTokenType);
            Ensure.ArgumentNotNullOrEmptyString(nameof(token), token);

            Login              = null;
            Password           = token;
            AuthenticationType = authenticationTokenType == AuthenticationTokenType.AccessToken ? AuthenticationType.AccessToken : AuthenticationType.ServiceToken;
        }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="tokenType">Token Type</param>
 public AuthenticationTokenRequiredException(AuthenticationTokenType tokenType) =>
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="tokenType">Token Type</param>
 public AuthenticationTokenRequiredArgs(AuthenticationTokenType tokenType) =>