authorize

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleAuthorize

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

HandleAuthorize godoc @Summary Authorize a client @Description Handles the authorization request and displays the login page @Tags authorize @Accept json @Produce html @Param response_type query string true "Response type" @Param client_id query string true "Client ID" @Param redirect_uri query string true "Redirect URI" @Param scope query string false "Scope" @Param state query string true "State" @Success 200 {string} string "HTML login page" @Failure 400 {object} model.ApiError @Failure 500 {object} model.ApiError @Router /oauth2/authorize [get]

func ValidateAuthorizeRequest

func ValidateAuthorizeRequest(input AuthorizeRequest) error

Types

type AuthorizeErrorResponse

type AuthorizeErrorResponse struct {
	Error            string `json:"error,omitempty"`
	ErrorDescription string `json:"error_description,omitempty"`
}

type AuthorizeRequest

type AuthorizeRequest struct {
	ResponseType        string
	ClientID            string
	RedirectURI         string
	Scope               string
	State               string
	Nonce               string
	CodeChallenge       string
	CodeChallengeMethod string
	Prompt              string
}

Jump to

Keyboard shortcuts

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