Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrMissingClientId = iota ErrMissingRedirectURI ErrInvalidRedirectURI ErrServerError )
View Source
const ( ResponseModeQuery = "query" ResponseModeFragment = "fragment" ResponseModeFormPost = "form_post" )
View Source
const ( DisplayTypePopup = "popup" DisplayTypeTouch = "touch" DisplayTypeWAP = "wap" DisplayTypePage = "page" )
View Source
const ( DefaultMaxMaxAge = 86400 DefaultMinMaxAge = 60 DefaultMaxNonceLength = 255 DefaultMaxCodeVerifierLength = 255 DefaultConsentOmissionPeriod = 86400 DefaultAuthSessionExpiresIn = 60 DefaultIdTokenExpiresIn = 86400 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTMLResponseHandler ¶
type HTMLResponseHandler struct {
// contains filtered or unexported fields
}
func NewHTMLResponseHandler ¶
func NewHTMLResponseHandler(w http.ResponseWriter, r *http.Request) *HTMLResponseHandler
func (*HTMLResponseHandler) Error ¶
func (h *HTMLResponseHandler) Error(uri, typ, desc, state string)
type Policy ¶
type Policy struct { MaxMaxAge int MinMaxAge int AllowEmptyScope bool MaxNonceLength int MaxCodeVerifierLength int ConsentOmissionPeriod int AuthSessionExpiresIn int IdTokenExpiresIn int DefaultAuthorizationCodeFlowResponseMode string DefaultImplicitFlowResponseMode string IgnoreInvalidResponseMode bool RequireResponseModeSecurityLevelCheck bool }
func DefaultPolicy ¶
func DefaultPolicy() *Policy
type RedirectResponseHandler ¶
type RedirectResponseHandler struct {
// contains filtered or unexported fields
}
func NewRedirectResponseHandler ¶
func NewRedirectResponseHandler(w http.ResponseWriter, r *http.Request, pt ResponseParamType) *RedirectResponseHandler
func (*RedirectResponseHandler) Error ¶
func (h *RedirectResponseHandler) Error(uri, typ, desc, state string)
type Request ¶
type Request struct { Flow *flow.Flow `json:"flow"` ClientId string `json:"client_id"` Scope string `json:"scope"` RedirectURI string `json:"redirect_uri"` ResponseMode string `json:"response_mode"` State string `json:"state"` CodeVerifier string `json:"code_verifier"` Nonce string `json:"nonce"` Display string `json:"display"` Prompt string `json:"prompt"` MaxAge int64 `json:"max_age"` UILocale string `json:"ui_locale"` IdTokenHint string `json:"id_token_hint"` LoginHint string `json:"login_hint"` }
func DecodeRequest ¶
type ResponseHandler ¶
type ResponseHandler interface { Success(uri string, params map[string]string) Error(uri, typ, desc, state string) }
func ResponseHandlerForMode ¶
func ResponseHandlerForMode(mode string, w http.ResponseWriter, r *http.Request) ResponseHandler
type ResponseParamType ¶
type ResponseParamType int
const ( ParamTypeQuery ResponseParamType = iota ParamTypeFragment )
func (ResponseParamType) Connector ¶
func (t ResponseParamType) Connector(uri string) string
Click to show internal directories.
Click to hide internal directories.