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"`
}
Click to show internal directories.
Click to hide internal directories.