Documentation
¶
Index ¶
- func JWTDecodeUnsafe(token string, target jwt.Claims) error
- func NewGoogleOAuthProvider() core.OAuthProvider
- type GoogleClaims
- type GoogleOAuthProvider
- func (g *GoogleOAuthProvider) Code2Token(ctx context.Context, code string) (string, error)
- func (g *GoogleOAuthProvider) GetRedirectURL(ctx context.Context) string
- func (g *GoogleOAuthProvider) Name() string
- func (g *GoogleOAuthProvider) Token2UserInfo(ctx context.Context, token string) (*core.UserDoc, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JWTDecodeUnsafe ¶
JWTDecodeUnsafe decodes the JWT without validating it and without verifying the sign.
func NewGoogleOAuthProvider ¶
func NewGoogleOAuthProvider() core.OAuthProvider
NewGoogleOAuthProvider is the constructor for GoogleOAuthProvider.
Types ¶
type GoogleClaims ¶
type GoogleClaims struct {
Email string `json:"email"`
GivenName string `json:"given_name"`
FamilyName string `json:"family_name"`
PictureLink string `json:"picture"`
}
GoogleClaims is the models of the claims present in a Google ID token.
func (*GoogleClaims) Valid ¶
func (g *GoogleClaims) Valid() error
type GoogleOAuthProvider ¶
type GoogleOAuthProvider struct {
// contains filtered or unexported fields
}
GoogleOAuthProvider implements core.OAuthProvider for google.
func (*GoogleOAuthProvider) Code2Token ¶
func (*GoogleOAuthProvider) GetRedirectURL ¶
func (g *GoogleOAuthProvider) GetRedirectURL(ctx context.Context) string
func (*GoogleOAuthProvider) Name ¶
func (g *GoogleOAuthProvider) Name() string
func (*GoogleOAuthProvider) Token2UserInfo ¶
Click to show internal directories.
Click to hide internal directories.