openid

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOIDCProvider

func NewOIDCProvider(log logging.Logger, authFlow authflow.AuthenticationFlow, callbackConfig common.CallbackConfig, config OIDCConfig) (common.Provider, error)

Types

type Claims

type Claims struct {
	Email         string      `json:"email"`
	EmailVerified bool        `json:"email_verified"`
	GivenName     string      `json:"given_name"`  // first name
	FamilyName    string      `json:"family_name"` // last name
	NickName      string      `json:"nickname"`    // nick name
	BirthDate     string      `json:"birthdate"`   // birthdate of the individual
	ZoneInfo      string      `json:"zoneinfo"`
	PhoneNumber   string      `json:"phone_number"`
	PhoneVerified bool        `json:"phone_number_verified"`
	HD            string      `json:"hd"`      // organization
	Locale        string      `json:"locale"`  // native language
	Picture       string      `json:"picture"` // face picture
	Profile       interface{} `json:"profile"`
	Address       interface{} `json:"address"`
}

Claims contains the attributes that are defined by the OpenID specification. This contains details about the user that the provider has. These are used to autofill in as much of the registration as possible.

https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims

type OIDCConfig

type OIDCConfig struct {
	common.ProviderConfig
	Provider     string //"https://accounts.google.com"
	ClientID     string
	ClientSecret string
}

type OIDCProvider

type OIDCProvider struct {
	// contains filtered or unexported fields
}

func (*OIDCProvider) AppendRoutes

func (o *OIDCProvider) AppendRoutes(router *mux.Router)

func (*OIDCProvider) CallbackHandler

func (o *OIDCProvider) CallbackHandler(w http.ResponseWriter, r *http.Request)

func (*OIDCProvider) Description

func (o *OIDCProvider) Description() string

func (*OIDCProvider) LoginHandler

func (o *OIDCProvider) LoginHandler(w http.ResponseWriter, r *http.Request)

func (*OIDCProvider) Name

func (o *OIDCProvider) Name() string

func (*OIDCProvider) Path

func (o *OIDCProvider) Path() string

Jump to

Keyboard shortcuts

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