Ignore:
Timestamp:
10/28/25 10:51:32 (11 months ago)
Author:
GitHub <noreply@…>
Branches:
master
Children:
4708118
Parents:
b38c39c (diff), c2e73b6 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Boris Gjorgjievski <69085722+imbrsk@…> (10/28/25 10:51:32)
git-committer:
GitHub <noreply@…> (10/28/25 10:51:32)
Message:

Merge branch 'Dev' into feature/getUser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • iknow-api/Controllers/AuthController.cs

    rb38c39c rff202cf  
    1212    {
    1313        private readonly IAuthService _authService;
     14        private readonly IRefreshTokenService _refreshTokenService;
    1415
    15         public AuthController(IAuthService authService)
     16        public AuthController(IAuthService authService, IRefreshTokenService refreshTokenService)
    1617        {
    1718            _authService = authService;
     19            _refreshTokenService = refreshTokenService;
    1820        }
    1921
     
    5456            return Ok(new { message = "You are authorized!" });
    5557        }
     58
     59        [HttpPost("verify-user-token")]
     60        public async Task<IActionResult> VerifyToken([FromBody] VerifyRefreshTokenDto verifyRefreshToken)
     61        {
     62            if (await _refreshTokenService.VerifyRefreshToken(verifyRefreshToken))
     63            { return Ok(await _authService.GenerateNewJWT(verifyRefreshToken)); }
     64            else
     65            { return BadRequest(new { message = "No token found!" }); }
     66        }
    5667    }
    5768}
Note: See TracChangeset for help on using the changeset viewer.