rename storage methods and fix mocks
This commit is contained in:
parent
3a46908051
commit
2a11a1979e
10 changed files with 204 additions and 161 deletions
|
@ -55,9 +55,9 @@ func CreateTokenResponse(ctx context.Context, request IDTokenRequest, client Cli
|
|||
|
||||
func createTokens(ctx context.Context, tokenRequest TokenRequest, storage Storage, refreshToken string) (id, newRefreshToken string, exp time.Time, err error) {
|
||||
if needsRefreshToken(tokenRequest) {
|
||||
return storage.CreateTokens(ctx, tokenRequest, refreshToken)
|
||||
return storage.CreateAccessAndRefreshTokens(ctx, tokenRequest, refreshToken)
|
||||
}
|
||||
id, exp, err = storage.CreateToken(ctx, tokenRequest)
|
||||
id, exp, err = storage.CreateAccessToken(ctx, tokenRequest)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue