MCPcopy
hub / github.com/larksuite/cli / ResolveToken

Method ResolveToken

internal/credential/default_provider.go:126–135  ·  view source on GitHub ↗
(ctx context.Context, req TokenSpec)

Source from the content-addressed store, hash-verified

124}
125
126func (p *DefaultTokenProvider) ResolveToken(ctx context.Context, req TokenSpec) (*TokenResult, error) {
127 switch req.Type {
128 case TokenTypeUAT:
129 return p.resolveUAT(ctx)
130 case TokenTypeTAT:
131 return p.resolveTAT(ctx)
132 default:
133 return nil, fmt.Errorf("unsupported token type: %s", req.Type)
134 }
135}
136
137// resolveUAT resolves a user access token. Not cached (unlike TAT) because UAT
138// may be refreshed between calls and GetValidAccessToken handles its own caching.

Callers

nothing calls this directly

Calls 2

resolveUATMethod · 0.95
resolveTATMethod · 0.95

Tested by

no test coverage detected