Documentation ¶
Index ¶
- func DeleteUserByID(_ service.AuthService) fiber.Handler
- func GetAllUsers(_ service.AuthService) fiber.Handler
- func GetUserByID(_ service.AuthService) fiber.Handler
- func GetUserRoles(_ service.AuthService) fiber.Handler
- func Login(svc service.AuthService) fiber.Handler
- func Logout(svc service.AuthService) fiber.Handler
- func RefreshToken(svc service.AuthService) fiber.Handler
- func Register(svc service.AuthService) fiber.Handler
- func RegisterRoutes(svc service.AuthService) *fiber.App
- func RequestToken(svc service.AuthService) fiber.Handler
- func UpdateUserByID(_ service.AuthService) fiber.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteUserByID ¶
func DeleteUserByID(_ service.AuthService) fiber.Handler
@Summary Delete a user by ID @Description Delete a user by ID @Tags User @Produce json @Success 200 {string} string @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Param user_id path string true "User ID" @Router /v1/user/{user_id} [delete] @Security Keycloak
func GetAllUsers ¶
func GetAllUsers(_ service.AuthService) fiber.Handler
@Summary Get all users @Description Get all users @Tags User @Produce json @Success 200 {object} entities.UserListResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Param page query string false "Page" @Param limit query string false "Limit" @Router /v1/user [get] @Security Keycloak
func GetUserByID ¶
func GetUserByID(_ service.AuthService) fiber.Handler
@Summary Get a user by ID @Description Get a user by ID @Tags User @Produce json @Success 200 {object} entities.UserResponse @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Param user_id path string true "User ID" @Router /v1/user/{user_id} [get] @Security Keycloak
func GetUserRoles ¶
func GetUserRoles(_ service.AuthService) fiber.Handler
@Summary Get user roles @Description Get user roles @Tags User @Produce json @Success 200 {object} entities.RoleListResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Param user_id path string true "User ID" @Param page query string false "Page" @Param limit query string false "Limit" @Router /v1/user/{user_id}/roles [get] @Security Keycloak
func Login ¶
func Login(svc service.AuthService) fiber.Handler
@Summary Request to login @Descriptio Request to login to the system. Returns a Login URL @Tags User @Produce json @Param redirect_url query string true "Redirect URL" @Success 200 {object} entities.LoginResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/user/login [get]
func Logout ¶
func Logout(svc service.AuthService) fiber.Handler
@Summary Logout from the system @Descriptio Logout from the system @Tags User @Param body body entities.LogoutRequest true "Logout information" @Success 200 {string} string "OK" @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/user/logout [post]
func RefreshToken ¶
func RefreshToken(svc service.AuthService) fiber.Handler
@Summary Refresh token @Description Refresh token @Tags User @Accept json @Produce json @Param body body entities.RefreshTokenRequest true "Refresh token information" @Success 200 {object} entities.ClientTokenResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/user/token/refresh [post]
func Register ¶
func Register(svc service.AuthService) fiber.Handler
@Summary Register a new user @Description Register a new user @Tags User @Accept json @Produce json @Param user body entities.UserRegisterRequest true "User information" @Success 201 {object} entities.UserResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/user [post] @Security Keycloak
func RegisterRoutes ¶
func RegisterRoutes(svc service.AuthService) *fiber.App
func RequestToken ¶
func RequestToken(svc service.AuthService) fiber.Handler
@Summary Validate login code and request a access token @Descriptio Validate login code and request a access token @Tags User @Accept json @Produce json @Param body body entities.LoginTokenRequest true "Callback information" @Param redirect_url query string true "Redirect URL" @Success 200 {object} entities.ClientTokenResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/user/login/token [post]
func UpdateUserByID ¶
func UpdateUserByID(_ service.AuthService) fiber.Handler
@Summary Update a user by ID @Description Update a user by ID @Tags User @Accept json @Produce json @Success 200 {object} entities.UserResponse @Failure 400 {object} HTTPError @Failure 404 {object} HTTPError @Failure 500 {object} HTTPError @Param user_id path string true "User ID" @Param user body entities.UserUpdateRequest true "User information" @Router /v1/user/{user_id} [put] @Security Keycloak
Types ¶
This section is empty.