Documentation ¶
Index ¶
Constants ¶
View Source
const ( NonceCookie = "NONCE" JWTCookie = "JWT" RedirectCookie = "REDIRECT" JWTHeader = "X-JWT" StateStringFmt = "%v|%v" )
Variables ¶
This section is empty.
Functions ¶
func NewOIDCAuth ¶
func NewOIDCAuth(clientID, clientSecret, redirectURL string) oidcAuthBuilder
Types ¶
type OIDCAuth ¶
type OIDCAuth struct {
// contains filtered or unexported fields
}
func (OIDCAuth) HandleCallBack ¶
func (o OIDCAuth) HandleCallBack(w http.ResponseWriter, r *http.Request)
HandleCallBack uses cookie to rebuild secret state variable to validate user has been authed
func (OIDCAuth) HandleRedirect ¶
func (o OIDCAuth) HandleRedirect(w http.ResponseWriter, r *http.Request)
HandleRedirect creates a session nonce, encrypts it in a cookie, builds a secret state and redirects user to auth service
Click to show internal directories.
Click to hide internal directories.