Beispiel #1
0
        public string GetAuthenticationToken(string key)
        {
            var token = Guid.NewGuid().ToString();

            if (_repository.Set(key, token, BaseKey, _tokenMaximumAge))
            {
                return(token);
            }

            throw new AuthenticationServiceException();
        }