Documentation
¶
Index ¶
- func RandomDelay()
- type ErrorMessage
- type ErrorReason
- type GetAuthzRequest
- type GetUserInfoHeader
- type LauthAPI
- func (api *LauthAPI) GetAuthz(c *gin.Context)
- func (api *LauthAPI) GetCerts(c *gin.Context)
- func (api *LauthAPI) GetConfiguration(c *gin.Context)
- func (api *LauthAPI) GetUserInfo(c *gin.Context)
- func (api LauthAPI) MakeLoginSession(clientIP, clientID string) (string, error)
- func (api *LauthAPI) PostAuthz(c *gin.Context)
- func (api *LauthAPI) PostToken(c *gin.Context)
- func (api *LauthAPI) SetErrorRoutes(r *gin.Engine)
- func (api *LauthAPI) SetRoutes(r gin.IRoutes)
- type PostAuthzRequest
- type PostTokenRequest
- type PostTokenResponse
- type StringSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomDelay ¶
func RandomDelay()
Types ¶
type ErrorMessage ¶
type ErrorMessage struct {
Err error `json:"-"`
RedirectURI *url.URL `json:"-"`
ResponseType string `json:"-"`
State string `json:"state,omitempty"`
Reason ErrorReason `json:"error"`
Description string `json:"error_description,omitempty"`
ErrorURI string `json:"error_uri,omitempty"`
}
func (ErrorMessage) Error ¶
func (msg ErrorMessage) Error() string
func (ErrorMessage) JSON ¶
func (msg ErrorMessage) JSON(c *gin.Context)
func (ErrorMessage) Redirect ¶
func (msg ErrorMessage) Redirect(c *gin.Context)
func (ErrorMessage) Report ¶
func (msg ErrorMessage) Report(r metrics.ErrorReporter)
func (ErrorMessage) Unwrap ¶
func (msg ErrorMessage) Unwrap() error
type ErrorReason ¶
type ErrorReason string
var ( AccessDenied ErrorReason = "access_denied" InvalidClient ErrorReason = "invalid_client" InvalidGrant ErrorReason = "invalid_grant" InvalidRequest ErrorReason = "invalid_request" InvalidScope ErrorReason = "invalid_scope" InvalidToken ErrorReason = "invalid_token" RequestNotSupported ErrorReason = "request_not_supported" RequestURINotSupported ErrorReason = "request_uri_not_supported" ServerError ErrorReason = "server_error" UnsupportedGrantType ErrorReason = "unsupported_grant_type" UnsupportedResponseType ErrorReason = "unsupported_response_type" )
func (ErrorReason) String ¶
func (e ErrorReason) String() string
type GetAuthzRequest ¶
type GetAuthzRequest struct {
ResponseType string `form:"response_type" json:"response_type" xml:"response_type"`
ClientID string `form:"client_id" json:"client_id" xml:"client_id"`
RedirectURI string `form:"redirect_uri" json:"redirect_uri" xml:"redirect_uri"`
Scope string `form:"scope" json:"scope" xml:"scope"`
State string `form:"state" json:"state" xml:"state"`
Nonce string `form:"nonce" json:"nonce" xml:"nonce"`
Prompt string `form:"prompt" json:"prompt" xml:"prompt"`
MaxAge int64 `form:"max_age" json:"max_age" xml:"max_age"`
LoginHint string `form:"login_hint" json:"login_hint" xml:"login_hint"`
Request string `form:"request" json:"request" xml:"request"`
RequestURI string `form:"request_uri" json:"request_uri" xml:"request_uri"`
}
func (*GetAuthzRequest) Bind ¶
func (req *GetAuthzRequest) Bind(c *gin.Context) *ErrorMessage
func (*GetAuthzRequest) BindAndValidate ¶
func (req *GetAuthzRequest) BindAndValidate(c *gin.Context, config *config.Config) *ErrorMessage
func (*GetAuthzRequest) Report ¶
func (req *GetAuthzRequest) Report(c *metrics.Context)
func (GetAuthzRequest) Validate ¶
func (req GetAuthzRequest) Validate(config *config.Config) *ErrorMessage
type GetUserInfoHeader ¶
type GetUserInfoHeader struct {
Authorization string `header:"Authorization"`
}
type LauthAPI ¶
func (*LauthAPI) GetConfiguration ¶
func (*LauthAPI) GetUserInfo ¶
func (LauthAPI) MakeLoginSession ¶
func (*LauthAPI) SetErrorRoutes ¶
type PostAuthzRequest ¶
type PostAuthzRequest struct {
GetAuthzRequest
User string `form:"username" json:"username" xml:"username"`
Password string `form:"password" json:"password" xml:"password"`
LoginToken string `form:"session" json:"session" xml:"session"`
}
func (*PostAuthzRequest) Bind ¶
func (req *PostAuthzRequest) Bind(c *gin.Context) *ErrorMessage
func (*PostAuthzRequest) BindAndValidate ¶
func (req *PostAuthzRequest) BindAndValidate(c *gin.Context, config *config.Config) *ErrorMessage
type PostTokenRequest ¶
type PostTokenRequest struct {
GrantType string `form:"grant_type" json:"grant_type" xml:"grant_type"`
Code string `form:"code" json:"code" xml:"code"`
RefreshToken string `form:"refresh_token" json:"refresh_token" xml:"refresh_token"`
ClientID string `form:"client_id" json:"client_id" xml:"client_id"`
ClientSecret string `form:"client_secret" json:"client_secret" xml:"client_secret"`
RedirectURI string `form:"redirect_uri" json:"redirect_uri" xml:"redirect_uri"`
}
func (*PostTokenRequest) Bind ¶
func (req *PostTokenRequest) Bind(c *gin.Context) *ErrorMessage
func (*PostTokenRequest) BindAndValidate ¶
func (req *PostTokenRequest) BindAndValidate(c *gin.Context, conf *config.Config) *ErrorMessage
func (PostTokenRequest) Validate ¶
func (req PostTokenRequest) Validate(conf *config.Config) *ErrorMessage
type PostTokenResponse ¶
Click to show internal directories.
Click to hide internal directories.