login

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleLoginUser

func HandleLoginUser(w http.ResponseWriter, r *http.Request)

HandleLoginUser godoc @Summary Log in a user @Description Authenticates a user and generates an authorization code @Tags auth @Accept application/x-www-form-urlencoded @Produce json @Param username formData string true "Username" @Param password formData string true "Password" @Param redirect formData string true "Redirect URI" @Param state formData string true "State" @Success 302 {string} string "Redirect to the provided URI with code and state" @Failure 400 {object} model.ApiError @Failure 500 {object} model.ApiError @Router /oauth2/login [post]

func ValidateLoginRequest

func ValidateLoginRequest(input LoginRequest) error

Types

type LoginRequest

type LoginRequest struct {
	Username            string `json:"username"`
	Password            string `json:"password"`
	State               string `json:"state"`
	RedirectURI         string `json:"redirect_uri"`
	ClientID            string `json:"client_id"`
	Scope               string `json:"scope"`
	Nonce               string `json:"nonce"`
	CodeChallenge       string `json:"code_challenge"`
	CodeChallengeMethod string `json:"code_challenge_method"`
}

Jump to

Keyboard shortcuts

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