authorize

package
v1.6.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeSignature added in v1.6.8

func AuthorizeSignature(request AuthorizeRequest) string

AuthorizeSignature computes the HMAC signature for the authorize request parameters.

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 oauth2 @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
	MaxAge              string
}

Jump to

Keyboard shortcuts

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