blockingCountingOAuthHandler is an OAuthHandler that blocks inside Authorize until the caller's context is cancelled, then returns a custom error that does NOT wrap context.Canceled. This mirrors real-world OAuth handlers that catch the cancellation internally and surface their own error type. The f
| 1025 | // relying on the error from Authorize, so this must still trigger c.fail(). |
| 1026 | // It records how many times Authorize is invoked. |
| 1027 | type blockingCountingOAuthHandler struct { |
| 1028 | mu sync.Mutex |
| 1029 | callCount int |
| 1030 | } |
| 1031 | |
| 1032 | func (h *blockingCountingOAuthHandler) TokenSource(ctx context.Context) (oauth2.TokenSource, error) { |
| 1033 | return nil, nil |
nothing calls this directly
no outgoing calls
no test coverage detected