Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthorizationCodeFlow ¶
type AuthorizationCodeFlow struct {
// contains filtered or unexported fields
}
AuthorizationCodeFlow (from OpenID Connect) using a private_key_jwt method for the final token exchange more info: https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowSteps allows to perform easily two steps: - the build of the url to ask for an authorization code - the exchange of the code vs final tokens
func NewAuthorizationCodeFlow ¶
func NewAuthorizationCodeFlow( cliID string, redConn *redis.Client, codeURL string, redirectCodeURL string, tokenRester rester.Client, tokenURL string, redirectTokenURL string, ) (*AuthorizationCodeFlow, error)
NewAuthorizationCodeFlow is AuthorizationCodeFlow's constructor
func (*AuthorizationCodeFlow) ExchangeToken ¶
func (acf *AuthorizationCodeFlow) ExchangeToken(c echo.Context)
ExchangeToken using an authorization code then redirect the user agent with information related to operation's success or failure
func (*AuthorizationCodeFlow) RequestCode ¶
func (acf *AuthorizationCodeFlow) RequestCode(w http.ResponseWriter, r *http.Request)
RequestCode by redirecting the user's agent to the authorization server with a well built URL to request a code Required to be keeped for some unofficial/in-house clients.
type AuthorizationCodeInput ¶
type AuthorizationCodeInput struct { Scopes []string State string Prompt string // Can only be "none" or empty }
AuthorizationCodeInput contains parameters for obtaining a code it is built from query parameters
type TokenError ¶
type TokenError struct { Code string `json:"error"` Desc string `json:"error_description"` Debug string `json:"error_debug"` }
TokenError represents the body error returned by the authorization server following https://tools.ietf.org/html/rfc6749#section-5.2
type TokenRequest ¶
TokenRequest contains parameters for exchanging a code against a token it is built from query parameters