Ignore:
Timestamp:
10/27/25 15:22:39 (11 months ago)
Author:
imbrsk <boris696boris@…>
Branches:
master
Children:
c155364
Parents:
e49c3ed
Message:

Implement refresh token functionality with associated services and repositories

File:
1 edited

Legend:

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

    re49c3ed r3347c1b  
    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-token")]
     60        public async Task<IActionResult> verifyToken([FromBody]  VerifyRefreshTokenDto VerifyRefreshTokenDto)
     61        {
     62            if (await _refreshTokenService.VerifyRefreshToken(VerifyRefreshTokenDto))
     63            {   return Ok();    }
     64            else
     65            {   return BadRequest("No token found");    }
     66        }
    5667    }
    5768}
Note: See TracChangeset for help on using the changeset viewer.