Beispiel #1
0
        public ActionResult RefreshTokens([FromBody] AccessRefreshTokenJSON tokenJSON)
        {
            AccessRefreshToken token;

            try
            {
                //ne proveryem srok godnosti
                token = new AccessRefreshToken(tokenJSON, CheckForExpiration: false);
                token.UpdateTokens();
            }
            catch (Exception ex)
            {
                _logger.LogError($"[POST]api/auth/update-tokens" + ex);
                return(BadRequest(ex.Message));
            }

            return(Ok(token.ParseToJSON()));
        }
Beispiel #2
0
 //ссылается на ніжній
 public AccessRefreshToken(AccessRefreshTokenJSON tokenJSON, bool CheckForExpiration = true) :
     this(tokenJSON.AccessToken, tokenJSON.RefreshToken, CheckForExpiration)
 {
 }