Documentation
¶
Overview ¶
Package oidc performs OIDC/OAuth2 authentication and returns an ID token. It is a plain library: callers own how the token state and user-facing progress are surfaced (the broker streams progress to ssh sessions; other callers may just discard it).
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Scopes = []string{"openid", "profile", "email"}
Scopes is fixed: nothing in epithet consumes claims beyond email/sub.
Functions ¶
func Authenticate ¶ added in v0.18.0
func Authenticate(ctx context.Context, cfg Config, prev *oauth2.Token, out io.Writer) (idToken string, next *oauth2.Token, err error)
Authenticate returns a fresh ID token. prev carries refresh state from the previous call (nil on first use); the returned token is the next state. User-facing progress ("visit this URL…") is written to out.
Types ¶
Click to show internal directories.
Click to hide internal directories.