Documentation
¶
Index ¶
- Constants
- func RandomDelay()
- type AuthzContext
- func (ctx *AuthzContext) Close() error
- func (ctx *AuthzContext) ErrorRedirect(err *errors.Error)
- func (ctx *AuthzContext) MakeRequestObject() (string, error)
- func (ctx *AuthzContext) SendTokens(subject string, authTime time.Time)
- func (ctx *AuthzContext) ShowConfirmPage(code int, initialUser string)
- func (ctx *AuthzContext) ShowLoginPage(code int, initialUser string, errorDescription string)
- func (ctx *AuthzContext) TrySSO(authorized bool) (proceed bool)
- type AuthzRequest
- type AuthzRequestUnmarshaller
- type GetAuthzRequestUnmarshaller
- type GetUserInfoRequest
- 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.SSOTokenClaims, error)
- func (api *LauthAPI) GetUserInfo(c *gin.Context)
- func (api *LauthAPI) Logout(c *gin.Context)
- func (api *LauthAPI) OptionsToken(c *gin.Context)
- func (api *LauthAPI) OptionsUserInfo(c *gin.Context)
- func (api *LauthAPI) PostAuthz(c *gin.Context)
- func (api *LauthAPI) PostToken(c *gin.Context)
- func (api *LauthAPI) PostUserInfo(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, client string, authenticated bool) error
- type LogoutRequest
- type OptionsUserInfoRequest
- type PostAuthzRequestUnmarshaller
- type PostTokenRequest
- type PostTokenResponse
- type PostUserInfoRequest
- type StringSet
Constants ¶
View Source
const (
SSO_TOKEN_COOKIE = "lauth_token"
)
Variables ¶
This section is empty.
Functions ¶
func RandomDelay ¶
func RandomDelay()
Types ¶
type AuthzContext ¶ added in v0.3.0
type AuthzContext struct {
API *LauthAPI
Gin *gin.Context
Request *AuthzRequest
Report *metrics.Context
}
func NewAuthzContext ¶ added in v0.3.0
func (*AuthzContext) Close ¶ added in v0.3.0
func (ctx *AuthzContext) Close() error
func (*AuthzContext) ErrorRedirect ¶ added in v0.3.0
func (ctx *AuthzContext) ErrorRedirect(err *errors.Error)
func (*AuthzContext) MakeRequestObject ¶ added in v0.5.0
func (ctx *AuthzContext) MakeRequestObject() (string, error)
func (*AuthzContext) SendTokens ¶ added in v0.3.0
func (ctx *AuthzContext) SendTokens(subject string, authTime time.Time)
func (*AuthzContext) ShowConfirmPage ¶ added in v0.3.0
func (ctx *AuthzContext) ShowConfirmPage(code int, initialUser string)
func (*AuthzContext) ShowLoginPage ¶ added in v0.3.0
func (ctx *AuthzContext) ShowLoginPage(code int, initialUser string, errorDescription string)
func (*AuthzContext) TrySSO ¶ added in v0.3.0
func (ctx *AuthzContext) TrySSO(authorized bool) (proceed bool)
type AuthzRequest ¶ added in v0.3.0
type AuthzRequest 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"`
MaxAge int64 `form:"max_age" json:"max_age" xml:"max_age"`
Prompt string `form:"prompt" json:"prompt" xml:"prompt"`
// use only GET method
LoginHint string `form:"login_hint" json:"login_hint" xml:"login_hint"`
Request string `form:"request" json:"request" xml:"request"`
// use only POST method
User string `form:"username" json:"username" xml:"username"`
Password string `form:"password" json:"password" xml:"password"`
// not supported
RequestURI string `form:"request_uri" json:"request_uri" xml:"request_uri"`
RequestExpiresAt int64 `form:"-" json:"-" xml:"-"`
RequestSubject string `form:"-" json:"-" xml:"-"`
}
func (*AuthzRequest) RequestObjectClaims ¶ added in v0.5.0
func (req *AuthzRequest) RequestObjectClaims() token.RequestObjectClaims
type AuthzRequestUnmarshaller ¶ added in v0.5.0
type AuthzRequestUnmarshaller interface {
GetRequest() *AuthzRequest
PreProcess(api *LauthAPI) *errors.Error
}
type GetAuthzRequestUnmarshaller ¶ added in v0.5.0
type GetAuthzRequestUnmarshaller AuthzRequest
func (*GetAuthzRequestUnmarshaller) GetRequest ¶ added in v0.5.0
func (req *GetAuthzRequestUnmarshaller) GetRequest() *AuthzRequest
func (*GetAuthzRequestUnmarshaller) PreProcess ¶ added in v0.5.0
func (req *GetAuthzRequestUnmarshaller) PreProcess(api *LauthAPI) *errors.Error
type GetUserInfoRequest ¶ added in v0.2.0
type GetUserInfoRequest struct {
Authorization string `form:"-" header:"Authorization"`
Origin string `form:"-" header:"Origin"`
}
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) OptionsToken ¶ added in v0.6.0
func (*LauthAPI) OptionsUserInfo ¶ added in v0.6.0
func (*LauthAPI) PostUserInfo ¶ added in v0.2.0
func (*LauthAPI) SetErrorRoutes ¶
type LogoutRequest ¶ added in v0.1.0
type OptionsUserInfoRequest ¶ added in v0.6.0
type OptionsUserInfoRequest struct {
Origin string `header:"Origin"`
}
type PostAuthzRequestUnmarshaller ¶ added in v0.5.0
type PostAuthzRequestUnmarshaller struct {
Request string `form:"request" json:"request" xml:"request"`
User string `form:"username" json:"username" xml:"username"`
Password string `form:"password" json:"password" xml:"password"`
// contains filtered or unexported fields
}
func (*PostAuthzRequestUnmarshaller) GetRequest ¶ added in v0.5.0
func (req *PostAuthzRequestUnmarshaller) GetRequest() *AuthzRequest
func (*PostAuthzRequestUnmarshaller) PreProcess ¶ added in v0.5.0
func (req *PostAuthzRequestUnmarshaller) PreProcess(api *LauthAPI) *errors.Error
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) BindAndValidate ¶
type PostTokenResponse ¶
type PostUserInfoRequest ¶ added in v0.2.0
type PostUserInfoRequest struct {
GetUserInfoRequest
AccessToken string `form:"access_token" header:"-"`
}
Click to show internal directories.
Click to hide internal directories.