(ctx context.Context, req TokenSpec)
| 124 | } |
| 125 | |
| 126 | func (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. |
nothing calls this directly
no test coverage detected