Documentation ¶
Index ¶
- Constants
- type OAuth2Handler
- type Provider
- func (p *Provider) NewClientCredentialsConfig(secret string, scopes []string, params map[string]string) *clientcredentials.Config
- func (p *Provider) NewOAuth2Config(secret string, redirectUrl string, scopes []string) *oauth2.Config
- func (p *Provider) NewOAuth2Handler(c *oauth2.Config) *OAuth2Handler
- func (p *Provider) UserInfo(ctx context.Context, source oauth2.TokenSource) (*oidc.UserInfo, error)
- func (p *Provider) Verifier() *oidc.IDTokenVerifier
- type Token
Constants ¶
View Source
const (
IssuerGoogle = "https://accounts.google.com"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OAuth2Handler ¶
type OAuth2Handler struct { IDToken *oidc.IDToken IDClaims *json.RawMessage UserInfo *oidc.UserInfo UserInfoClaims *json.RawMessage OAuth2Token *oauth2.Token // contains filtered or unexported fields }
func (*OAuth2Handler) AuthCodeURL ¶
func (h *OAuth2Handler) AuthCodeURL(opts ...oauth2.AuthCodeOption) string
func (*OAuth2Handler) ServeHTTP ¶
func (h *OAuth2Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
func (*Provider) NewClientCredentialsConfig ¶
func (*Provider) NewOAuth2Config ¶
func (*Provider) NewOAuth2Handler ¶
func (p *Provider) NewOAuth2Handler(c *oauth2.Config) *OAuth2Handler
Click to show internal directories.
Click to hide internal directories.