Documentation ¶
Index ¶
- type GetConfigResponse
- type OIDCConfig
- type OIDCHandler
- func (h *OIDCHandler) GetAuthorizationURL() string
- func (h *OIDCHandler) GetConfig() *OIDCConfig
- func (h *OIDCHandler) GetConfigResponse() GetConfigResponse
- func (h *OIDCHandler) HandleCallback(w http.ResponseWriter, r *http.Request) (string, error)
- func (h *OIDCHandler) HandleLogin(w http.ResponseWriter, r *http.Request)
- func (h *OIDCHandler) SetStateCookie(w http.ResponseWriter, r *http.Request, state string)
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetConfigResponse ¶ added in v1.55.0
type OIDCConfig ¶ added in v1.55.0
type OIDCHandler ¶ added in v1.55.0
type OIDCHandler struct {
// contains filtered or unexported fields
}
func NewOIDCHandler ¶ added in v1.55.0
func (*OIDCHandler) GetAuthorizationURL ¶ added in v1.55.0
func (h *OIDCHandler) GetAuthorizationURL() string
func (*OIDCHandler) GetConfig ¶ added in v1.55.0
func (h *OIDCHandler) GetConfig() *OIDCConfig
func (*OIDCHandler) GetConfigResponse ¶ added in v1.55.0
func (h *OIDCHandler) GetConfigResponse() GetConfigResponse
func (*OIDCHandler) HandleCallback ¶ added in v1.55.0
func (h *OIDCHandler) HandleCallback(w http.ResponseWriter, r *http.Request) (string, error)
func (*OIDCHandler) HandleLogin ¶ added in v1.55.0
func (h *OIDCHandler) HandleLogin(w http.ResponseWriter, r *http.Request)
func (*OIDCHandler) SetStateCookie ¶ added in v1.55.0
func (h *OIDCHandler) SetStateCookie(w http.ResponseWriter, r *http.Request, state string)
SetStateCookie sets a secure cookie containing the OIDC state parameter. The state parameter is verified when the OAuth provider redirects back to our callback. Short expiration ensures the authentication flow must be completed in a reasonable timeframe.
type Service ¶
type Service interface { GetUserCount(ctx context.Context) (int, error) Login(ctx context.Context, username, password string) (*domain.User, error) CreateUser(ctx context.Context, req domain.CreateUserRequest) error UpdateUser(ctx context.Context, req domain.UpdateUserRequest) error CreateHash(password string) (hash string, err error) ComparePasswordAndHash(password string, hash string) (match bool, err error) }
Click to show internal directories.
Click to hide internal directories.