Exemple #1
0
        public IActionResult RefreshToken([FromHeader] string Authorization)
        {
            var baseUser = _authUser.CheckRefreshToken(Authorization);

            if (baseUser != null && baseUser.IsActive)
            {
                var tokens = _jwtTokenProvider.GenerateJwtUserToken(baseUser);

                var payloadData = _authUser.PackPayloadPart(tokens, baseUser);

                return(Ok(new JsonPayloadPattern().JsonPayload(_success, "", Ok().StatusCode, payloadData)));
            }
            return(Unauthorized());
        }