示例#1
0
        public string RestoreToken(string userId, string token)
        {
            this.InitializeSecurityToken();

            try
            {
                return(_authTokenManager.Restore(
                           userId,
                           token));
            }
            catch (Exception e)
            {
                throw SoapExceptionFactory.Create(e);
            }
        }
示例#2
0
        public void RemoveToken(String userId, String token)
        {
            this.InitializeSecurityToken();

            try
            {
                _authTokenManager.RemoveToken(
                    userId,
                    token);
            }
            catch (Exception e)
            {
                throw SoapExceptionFactory.Create(e);
            }
        }
示例#3
0
        public string GenerateTemporalToken(String userId, double milliseconds, AuthTokenManager.KeyLengthEnum keyLength, AuthTokenManager.KeyLengthEnum initializationVectorLength)
        {
            this.InitializeSecurityToken();

            try
            {
                return(_authTokenManager.Generate(
                           userId,
                           AuthTokenManager.TokenTypeEnum.Temporal,
                           milliseconds,
                           keyLength,
                           initializationVectorLength));
            }
            catch (Exception e)
            {
                throw SoapExceptionFactory.Create(e);
            }
        }
示例#4
0
        public string GenerateOneTimeToken(string userId, AuthTokenManager.KeyLengthEnum keyLength, AuthTokenManager.KeyLengthEnum initializationVectorLength)
        {
            this.InitializeSecurityToken();

            try
            {
                return(_authTokenManager.Generate(
                           userId,
                           AuthTokenManager.TokenTypeEnum.OneTime,
                           TimeSpan.Zero.TotalMilliseconds,
                           keyLength,
                           initializationVectorLength));
            }
            catch (Exception e)
            {
                throw SoapExceptionFactory.Create(e);
            }
        }