user

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 1, 2025 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllUsers

func GetAllUsers(svc service.AuthService) fiber.Handler

@Summary Get all users @Description Get all users @Id get-all-users @Tags User @Produce json @Success 200 {object} entities.UserListResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Param user_ids query string false "User IDs" @Router /v1/user [get] @Security Keycloak

func GetAuthDummyCode

func GetAuthDummyCode() fiber.Handler

func GetUsersByRole

func GetUsersByRole(svc service.AuthService) fiber.Handler

@Summary Get users by role @Description Get users by role @Id get-users-by-role @Tags User @Produce json @Success 200 {object} entities.UserListResponse @Failure 400 {object} HTTPError @Failure 500 {object} HTTPError @Router /v1/user/role/{role} [get] @Param role path string true "Role" @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 RegisterPublicRoutes

func RegisterPublicRoutes(r fiber.Router, svc service.AuthService)

func RegisterRoutes

func RegisterRoutes(r fiber.Router, svc service.AuthService)

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]

Types

This section is empty.

Jump to

Keyboard shortcuts

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