Documentation ¶
Index ¶
- Constants
- func RandomDelay()
- type ErrorMessage
- func (msg ErrorMessage) Error() string
- func (msg ErrorMessage) HTML(c *gin.Context)
- func (msg ErrorMessage) JSON(c *gin.Context)
- func (msg ErrorMessage) Redirect(c *gin.Context)
- func (msg ErrorMessage) Report(r metrics.ErrorReporter)
- func (msg ErrorMessage) StatusCode() int
- func (msg ErrorMessage) Unwrap() error
- type ErrorReason
- type GetAuthzRequest
- type GetUserInfoHeader
- type LauthAPI
- func (api *LauthAPI) DeleteSSOToken(c *gin.Context)
- func (api *LauthAPI) GetAuthz(c *gin.Context)
- func (api *LauthAPI) GetCerts(c *gin.Context)
- func (api *LauthAPI) GetConfiguration(c *gin.Context)
- func (api *LauthAPI) GetSSOToken(c *gin.Context) (token.IDTokenClaims, error)
- func (api *LauthAPI) GetUserInfo(c *gin.Context)
- func (api *LauthAPI) Logout(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)
- func (api *LauthAPI) SetSSOToken(c *gin.Context, subject string) error
- type LogoutRequest
- type PostAuthzRequest
- type PostTokenRequest
- type PostTokenResponse
- type StringSet
Constants ¶
View Source
const (
SSO_TOKEN_COOKIE = "lauth_token"
)
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) HTML ¶ added in v0.1.0
func (msg ErrorMessage) HTML(c *gin.Context)
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) StatusCode ¶ added in v0.1.0
func (msg ErrorMessage) StatusCode() int
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) 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) DeleteSSOToken ¶ added in v0.1.0
func (*LauthAPI) GetConfiguration ¶
func (*LauthAPI) GetSSOToken ¶ added in v0.1.0
func (*LauthAPI) GetUserInfo ¶
func (LauthAPI) MakeLoginSession ¶
func (*LauthAPI) SetErrorRoutes ¶
type LogoutRequest ¶ added in v0.1.0
type LogoutRequest struct { IDTokenHint string `form:"id_token_hint" json:"id_token_hint" xml:"id_token_hint"` RedirectURI string `form:"post_logout_redirect_uri" json:"post_logout_redirect_uri" xml:"post_logout_redirect_uri"` State string `form:"state" json:"state" xml:"state"` }
func (*LogoutRequest) Bind ¶ added in v0.1.0
func (req *LogoutRequest) Bind(c *gin.Context) *ErrorMessage
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
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.