login

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: MIT Imports: 9 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"`
	Redirect string `json:"redirect"`
}

Jump to

Keyboard shortcuts

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