Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallbackHandler ¶
type CallbackHandler struct {
// contains filtered or unexported fields
}
CallbackHandler is the API Handler for OAuth2 callback handling
func NewCallbackHandler ¶
func NewCallbackHandler(keycloakAuth *caa.KeycloakAuthService) CallbackHandler
NewCallbackHandler initializes and returns a new handler for OAuth2 callback
func (CallbackHandler) Handle ¶
func (ch CallbackHandler) Handle(c echo.Context) error
Handle godoc @Summary Exchange authorization code for tokens @Description Exchange authorization code for tokens @Tags auth @Accept json @Produce json @Param message body cam.APICallbackRequest true "Callback request with code and code_verifier from BFF" @Success 200 {object} cam.APITokenResponse "Token exchange successful" @Router /auth/callback [post]
type LoginHandler ¶
type LoginHandler struct {
// contains filtered or unexported fields
}
LoginHandler is the API Handler for user authentication with OAuth2 flow
func NewLoginHandler ¶
func NewLoginHandler(keycloakAuth *caa.KeycloakAuthService) LoginHandler
NewLoginHandler initializes and returns a new handler for user login
func (LoginHandler) Handle ¶
func (lh LoginHandler) Handle(c echo.Context) error
Handle godoc @Summary Authenticate user with OAuth2 flow or client credentials @Description Authenticate using either email-based OAuth2 flow (returns AuthFlowResponse) or client credentials flow (returns TokenResponse) @Tags auth @Accept json @Produce json @Param message body cam.APILoginRequest true "Login request with either email+redirectURI or clientId+clientSecret" @Success 200 {object} cam.APILoginResponse "OAuth2 flow initiated successfully (for email-based auth)" @Success 200 {object} cam.APITokenResponse "Client credentials authentication successful" @Router /auth/login [post]
type LogoutHandler ¶
type LogoutHandler struct {
// contains filtered or unexported fields
}
LogoutHandler is the API Handler for user logout
func NewLogoutHandler ¶
func NewLogoutHandler(keycloakAuth *caa.KeycloakAuthService) LogoutHandler
NewLogoutHandler initializes and returns a new handler for user logout
func (LogoutHandler) Handle ¶
func (lh LogoutHandler) Handle(c echo.Context) error
Handle godoc @Summary User logout @Description Revoke refresh tokens and end Keycloak session @Tags auth @Accept json @Produce json @Param message body cam.APILogoutRequest true "Logout request" @Success 200 {object} string @Router /auth/logout [post]
type RefreshTokenHandler ¶
type RefreshTokenHandler struct {
// contains filtered or unexported fields
}
RefreshTokenHandler is the API Handler for refreshing access tokens
func NewRefreshTokenHandler ¶
func NewRefreshTokenHandler(keycloakAuth *caa.KeycloakAuthService) RefreshTokenHandler
NewRefreshTokenHandler initializes and returns a new handler for token refresh
func (RefreshTokenHandler) Handle ¶
func (rth RefreshTokenHandler) Handle(c echo.Context) error
Handle godoc @Summary Refresh access token @Description Refresh an access token using a refresh token @Tags auth @Accept json @Produce json @Param message body cam.APIRefreshTokenRequest true "Refresh token request" @Success 200 {object} cam.APITokenResponse @Router /auth/refresh [post]