Documentation
¶
Index ¶
- func NewOIDCProvider(log logging.Logger, authFlow authflow.AuthenticationFlow, ...) (common.Provider, error)
- type Claims
- type OIDCConfig
- type OIDCProvider
- func (o *OIDCProvider) AppendRoutes(router *mux.Router)
- func (o *OIDCProvider) CallbackHandler(w http.ResponseWriter, r *http.Request)
- func (o *OIDCProvider) Description() string
- func (o *OIDCProvider) LoginHandler(w http.ResponseWriter, r *http.Request)
- func (o *OIDCProvider) Name() string
- func (o *OIDCProvider) Path() string
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
Click to show internal directories.
Click to hide internal directories.