Documentation
¶
Overview ¶
Package oauth defines provider interfaces and shared OAuth profile types used by Canopy.
Provider implementations are responsible for constructing OAuth2 configuration, exchanging authorization codes, refreshing provider access tokens, and normalizing verified provider profile data into Canopy's account model.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
type Provider interface {
ID() string
Config(ctx context.Context) (*oauth2.Config, error)
AuthCodeOptions(StartOptions) []oauth2.AuthCodeOption
Exchange(ctx context.Context, code string, verifier string) (*oauth2.Token, error)
Refresh(ctx context.Context, refreshToken string) (*oauth2.Token, error)
Profile(ctx context.Context, token *oauth2.Token, nonce string) (*Profile, error)
}