Пример #1
0
        public IDataResult <AccessToken> CreateAccessToken(UserAuth userAuth)
        {
            var claims      = _userAuthService.GetClaims(userAuth);
            var accessToken = _tokenHelper.CreateToken(userAuth, claims.Data);

            return(new SuccessDataResult <AccessToken>(accessToken, Messages.AccessTokenCreated));
        }
Пример #2
0
        public IActionResult GetClaim(UserAuth userAuth)
        {
            var result = _userAuthService.GetClaims(userAuth);

            if (result.Success)
            {
                return(Ok(result));
            }
            return(BadRequest(result));
        }