Example #1
0
        public async Task ValidateTokenAsync(Guid accessTokenId)
        {
            var accessToken = await _accessTokenRepository.FindAsync(accessTokenId);

            if (accessToken == null || accessToken.Disabled)
            {
                throw new UnauthorizedException("Access token has been disabled, please authenticate again.");
            }
        }