Method
updateTokenResponseCache
(tokenRequest tokenRequest, tokenResponse tokenResponse)
Source from the content-addressed store, hash-verified
| 72 | } |
| 73 | |
| 74 | func (a BearerAuthenticator) updateTokenResponseCache(tokenRequest tokenRequest, tokenResponse tokenResponse) { |
| 75 | cacheKey := a.cacheKey(tokenRequest) |
| 76 | a.cache.Set(cacheKey, tokenResponse.AccessToken, tokenResponse.ExpiresAt.Add(-TokenExpiryGracePeriod)) |
| 77 | } |
| 78 | |
| 79 | func (a BearerAuthenticator) cacheKey(tokenRequest tokenRequest) string { |
| 80 | return fmt.Sprintf("beareraccesstoken|%s|%s|%s|%s|%s|%s|%s|%s|%s|%s", |
Tested by
no test coverage detected