import "code.pfad.fr/gopenidclient/static"
package static uses golang.org/x/oauth2 to implement a Provider for the OAuth2 flow with a static config.
type OAuth2 struct { Config *oauth2.Config UserInfoEndpoint string EndSessionEndpoint string HTTPClient *http.Client // will use http.DefaultClient if let nil }
OAuth2 implements a Provider for the OAuth2 flow.
AuthCodeURL returns the Auth-URL to redirect the user to
func (o *OAuth2) Exchange(code, verifier string) (token *oauth2.Token, unmarshalUser func(interface{}) error, err error)
Exchange exchanges the code and provides a way to unmarshal the user info
func (o *OAuth2) Refresh(refreshToken string) (token *oauth2.Token, unmarshalUser func(interface{}) error, err error)
SetRedirectURL sets the local callback URL.