| 300 | var _ api.OAuthAPI = &testAPI{} |
| 301 | |
| 302 | type testAPI struct { |
| 303 | getDeviceToken func(audience string) (api.State, error) |
| 304 | waitForDeviceToken func(state api.State) (api.TokenResponse, error) |
| 305 | refresh func(token string) (api.TokenResponse, error) |
| 306 | revokeToken func(token string) error |
| 307 | getAutoPAT func(audience string, res api.TokenResponse) (string, error) |
| 308 | } |
| 309 | |
| 310 | func (t *testAPI) GetDeviceCode(_ context.Context, audience string) (api.State, error) { |
| 311 | if t.getDeviceToken != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected