public void Should_Revoke_Refresh_Token() { var accessToken = _tokenHandler.CreateAccessToken(_user); _tokenHandler.RevokeRefreshToken(accessToken.RefreshToken.Token); var refreshToken = _tokenHandler.TakeRefreshToken(accessToken.RefreshToken.Token); Assert.Null(refreshToken); }
public BaseResponse <AccessToken> RevokeRefreshRToken(string refreshToken) { BaseResponse <User> userResponse = userService.GetUserWithRefreshToken(refreshToken); if (userResponse.Success) { tokenHandler.RevokeRefreshToken(userResponse.Extra); return(new BaseResponse <AccessToken>(new AccessToken())); } else { return(new BaseResponse <AccessToken>("refreshtoken bulunamadı")); } }
public void RevokeRefreshToken(string refreshToken) { _tokenHandler.RevokeRefreshToken(refreshToken); }