Documentation
¶
Index ¶
Constants ¶
const RefreshGrace = time.Minute
RefreshGrace is the safety window before expiry where tokens are refreshed.
Variables ¶
This section is empty.
Functions ¶
func PublicHTTPSURL ¶
PublicHTTPSURL canonicalizes one HTTPS endpoint and rejects non-public addresses so OAuth exchanges cannot target local or reserved networks.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
TokenEndpoint string
TokenEndpointAuthMethod string
Resource string
Scopes []string
}
AuthConfig describes the non-sensitive OAuth metadata needed for refresh.
type Record ¶
type Record struct {
ClientID string `json:"clientId,omitempty"`
ClientSecret string `json:"clientSecret,omitempty"`
Token *oauth2.Token `json:"token,omitempty"`
Scopes []string `json:"scopes,omitempty"`
Registration map[string]any `json:"registration,omitempty"`
Revocation map[string]any `json:"revocation,omitempty"`
UpdatedAt time.Time `json:"updatedAt"`
}
Record stores the shared OAuth credential material kept in OpenBao.