MCPcopy Create free account
hub / github.com/UiPath/uipathcli / getAccessTokenFromCache

Method getAccessTokenFromCache

auth/oauth_authenticator.go:118–125  ·  view source on GitHub ↗
(config oauthAuthenticatorConfig)

Source from the content-addressed store, hash-verified

116}
117
118func (a OAuthAuthenticator) getAccessTokenFromCache(config oauthAuthenticatorConfig) *tokenResponse {
119 cacheKey := a.accessTokenCacheKey(config)
120 token, expiresAt := a.cache.Get(cacheKey)
121 if token == "" {
122 return nil
123 }
124 return newTokenResponse(token, expiresAt, nil)
125}
126
127func (a OAuthAuthenticator) updateTokenResponseCache(config oauthAuthenticatorConfig, tokenResponse *tokenResponse) {
128 cacheKey := a.accessTokenCacheKey(config)

Callers 1

retrieveTokenMethod · 0.95

Calls 3

accessTokenCacheKeyMethod · 0.95
newTokenResponseFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected