| 289 | } |
| 290 | |
| 291 | func (a *API) generateAccessToken(r *http.Request, tx *storage.Connection, user *models.User, sessionId *uuid.UUID, authenticationMethod models.AuthenticationMethod) (string, int64, error) { |
| 292 | return a.tokenService.GenerateAccessToken(r, tx, tokens.GenerateAccessTokenParams{ |
| 293 | User: user, |
| 294 | SessionID: sessionId, |
| 295 | AuthenticationMethod: authenticationMethod, |
| 296 | }) |
| 297 | } |
| 298 | |
| 299 | func (a *API) issueRefreshToken(r *http.Request, headers http.Header, conn *storage.Connection, user *models.User, authenticationMethod models.AuthenticationMethod, grantParams models.GrantParams) (*tokens.AccessTokenResponse, error) { |
| 300 | return a.tokenService.IssueRefreshToken(r, headers, conn, user, authenticationMethod, grantParams) |