oauth2

package
v0.0.0-...-8b5928e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoogleOAuth2Provider = "Google"
)

Variables

This section is empty.

Functions

func RevokeGoogleOAuth2Token

func RevokeGoogleOAuth2Token(tk *oauth2.Token) error

Types

type Helper

type Helper struct {
	oauth2.Config
	Revoke func(*oauth2.Token) error
}

func NewGoogleOAuth2Helper

func NewGoogleOAuth2Helper(redirectURL string, sm secrets.SecretManager) *Helper

Build a oauth2.Config object with Google as the provider.

type IDTokenClaims

type IDTokenClaims map[string]interface{}

ID tokens (from OpenID connect) are presented in JWT format, with the relevant fields in the Claims section.

func (IDTokenClaims) Email

func (c IDTokenClaims) Email() (string, error)

type OAuth2Config

type OAuth2Config struct {
	Provider    string
	RedirectURL string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL