public async Task <IActionResult> RefreshToken(RefreshTokenTemplate refreshTokenTemplate) { JwtAdto jwt = await _authenticationApplicationService.RefreshTokenAsync(new RefreshTokenAdto { SessionId = refreshTokenTemplate.SessionId, Token = refreshTokenTemplate.Token }); return(Ok(_resourceBuilder.Build(new SessionResource { Id = jwt.SessionId, AuthToken = jwt.AuthToken, ExpiresIn = jwt.ExpiresIn }))); }
public Task <JwtAdto> RefreshTokenAsync(RefreshTokenAdto refreshTokenAdto) { return(_securityApplicationService.SecureAsync(() => _authenticationApplicationService.RefreshTokenAsync(refreshTokenAdto), DefaultAuthorisationContext.Create(AuthorisationResource.Authenticate, AuthorisationAction.Create))); }