handler

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL