Documentation ¶
Index ¶
Constants ¶
View Source
const RoleAdmin = "admin"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OIDCClient ¶
type OIDCClient struct {
// contains filtered or unexported fields
}
func NewOIDCClient ¶
func NewOIDCClient(issuerURL, clientID, clientSecret string) (*OIDCClient, error)
func (*OIDCClient) GetAuthCodeURL ¶
func (c *OIDCClient) GetAuthCodeURL(redirectURL string) (url, state string)
GetAuthCodeURL generates a random state and returns an auth code URL and the generated state
func (*OIDCClient) ValidateCallbackWithRoles ¶
type SessionAuthenticator ¶
type SessionAuthenticator struct {
// contains filtered or unexported fields
}
func NewSessionAuthenticator ¶
func NewSessionAuthenticator(sessionValidity time.Duration) *SessionAuthenticator
func (*SessionAuthenticator) MW ¶
func (s *SessionAuthenticator) MW(redirectPathNotLoggedIn string) gin.HandlerFunc
func (*SessionAuthenticator) MustHaveSessionLogin ¶
func (s *SessionAuthenticator) MustHaveSessionLogin(c *gin.Context) (username string, err error)
func (*SessionAuthenticator) StartSession ¶
func (s *SessionAuthenticator) StartSession(session sessions.Session, username string) error
Click to show internal directories.
Click to hide internal directories.