Documentation
¶
Overview ¶
Package oauthtest is a test double for an OAuth token endpoint whose refresh tokens are single-use and rotate, like the real vendors': a refresh token works exactly once, and replaying it is rejected with 400 invalid_grant. It counts refreshes so tests can assert that concurrent resolvers (goroutines or separate processes) spend a login exactly once.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
Server is a rotating-refresh-token endpoint.
func New ¶
New starts a server that accepts initialRefresh once. delay stalls each successful exchange (widening a race window); access mints the access token for the n-th refresh (1-based), nil meaning "access-<n>".