Documentation
¶
Overview ¶
Package userinfo calls GitLab Rails' `/api/v4/iam/userinfo` endpoint, authenticated with the access token minted for the same token exchange as a bearer credential. Unlike `/oauth/userinfo`, that endpoint only accepts an IAM-issued OAuth JWT, so it exists to serve exactly this caller.
Index ¶
Constants ¶
const RequestTimeout = 10 * time.Second
RequestTimeout bounds the call so a slow or hanging endpoint can't stall every token exchange indefinitely. Exported so callers constructing the *http.Client passed to NewClient can size its Timeout the same way.
Variables ¶
var ErrFetchFailed = errors.New("user info unavailable")
ErrFetchFailed is the only error FetchUserInfo ever returns. fosite's stock OpenIDConnectExplicitHandler echoes a failing storage call's error string verbatim to the OAuth client as error_debug (WriteOAuthError in auth/oauth/server/errors.go copies it through unconditionally), so the real cause — which can include this endpoint's host or a raw dial error — is logged here instead of returned.
Functions ¶
This section is empty.