Documentation ¶
Index ¶
- Constants
- type AuthCookie
- type Authenticator
- func (a *Authenticator) GenUserCookieValue(username string, expires time.Time) (string, error)
- func (a *Authenticator) GetRemoteUserName(w http.ResponseWriter, r *http.Request) (string, error)
- func (s *Authenticator) JWTClaims(t *jwt.JSONWebToken, dest ...interface{}) (err error)
- func (a *Authenticator) Oauth2RedirectPathHandler(w http.ResponseWriter, r *http.Request)
- type OpenIDConfig
- type SetHeadersFunc
Constants ¶
View Source
const AuthCookieName = "authn_cookie"
View Source
const Oauth2redirectPath = "/oauth2/redirect"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthCookie ¶
type Authenticator ¶
type Authenticator struct {
// contains filtered or unexported fields
}
func NewAuthenticator ¶
func NewAuthenticator(config OpenIDConfig, appName string, netClient *http.Client, sharedSecrets []string, logger *log.Logger, setHeadersFunc SetHeadersFunc) *Authenticator
func (*Authenticator) GenUserCookieValue ¶
This function is only for testing purposes, should not be used in prod
func (*Authenticator) GetRemoteUserName ¶
func (a *Authenticator) GetRemoteUserName(w http.ResponseWriter, r *http.Request) (string, error)
func (*Authenticator) JWTClaims ¶
func (s *Authenticator) JWTClaims(t *jwt.JSONWebToken, dest ...interface{}) (err error)
Next are the functions for checking the callback
func (*Authenticator) Oauth2RedirectPathHandler ¶
func (a *Authenticator) Oauth2RedirectPathHandler(w http.ResponseWriter, r *http.Request)
type OpenIDConfig ¶
type SetHeadersFunc ¶
type SetHeadersFunc func(w http.ResponseWriter) error
Click to show internal directories.
Click to hide internal directories.