providers

package
v0.0.0-...-0ac0b20 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCodeExchange = errors.New("error on code exchange")

ErrCodeExchange is returned when the auth code exchange failed

View Source
var ErrJWTClaims = errors.New("invalid jwt claims")

ErrJWTClaims is returned when required claims are missing

View Source
var ErrJWTParse = errors.New("cannot parse jwt")

ErrJWTParse is returned when a given JWT is invalid

View Source
var ErrNoEmail = errors.New("no email found in user profile")

ErrNoEmail is returned when no email is present in the OIDC profile

View Source
var ErrProfile = errors.New("error getting user profile")

ErrProfile is returned when user profile fetch failed

Functions

This section is empty.

Types

type OAuth2Config

type OAuth2Config struct {
	ClientID     string
	ClientSecret string
	AuthURL      string
	TokenURL     string
	ProfileURL   string
}

OAuth2Config OAuth2 provider configuration settings

type OAuth2Provider

type OAuth2Provider interface {
	FetchUser(r *http.Request) (UserInfo, error)
	GetLoginURL(callbackURL, state string) string
}

OAuth2Provider provider interface

type OIDClaims

type OIDClaims struct {
	jwt.StandardClaims
	Email string `json:"email,omitempty"`
}

type UserInfo

type UserInfo struct {
	Email string
}

UserInfo represents a Open ID Connect user info

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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