示例#1
0
 public SessionInfo(Auth_Token Token)
 {
     this._Created = DateTime.Now;
     this._ListOfAuthStopTokens = new List <Auth_Token>()
     {
         Token
     };
 }
示例#2
0
        /// <summary>
        /// Create a new auth token status.
        /// </summary>
        /// <param name="AuthToken">The unique identification of an auth token.</param>
        /// <param name="Status">The current status of an auth token.</param>
        public AuthTokenStatus(Auth_Token AuthToken,
                               AuthTokenStatusType Status)

        {
            #region Initial checks

            if (AuthToken == null)
            {
                throw new ArgumentNullException(nameof(AuthToken), "The given unique identification of an auth token must not be null!");
            }

            #endregion

            this._AuthToken = AuthToken;
            this._Status    = Status;
        }
示例#3
0
 /// <summary>
 /// Create a new authentication info based on the given authentication token.
 /// </summary>
 /// <param name="AuthToken">An authentication token.</param>
 public static AuthInfo FromAuthToken(Auth_Token AuthToken)
 {
     return(new AuthInfo(AuthToken));
 }
示例#4
0
 private AuthInfo(Auth_Token AuthToken)
 {
     this._AuthToken = AuthToken;
 }
示例#5
0
        /// <summary>
        /// Create a new authentication info based on the given authentication token.
        /// </summary>
        /// <param name="AuthToken">An authentication token.</param>
        /// <param name="Description">An optional multilingual description.</param>
        public static RemoteAuthentication FromAuthToken(Auth_Token AuthToken,
                                                         I18NString Description = null)

        => new RemoteAuthentication(AuthToken:   AuthToken,
                                    Description: Description);