Documentation ¶
Index ¶
- type DefaultAccessRevoker
- func (r DefaultAccessRevoker) RevokeWithClientId(ctx context.Context, clientId string, revokeRefreshToken bool) error
- func (r DefaultAccessRevoker) RevokeWithSessionId(ctx context.Context, sessionId string, sessionName string) (err error)
- func (r DefaultAccessRevoker) RevokeWithTokenValue(ctx context.Context, tokenValue string, hint auth.RevokerTokenHint) error
- func (r DefaultAccessRevoker) RevokeWithUsername(ctx context.Context, username string, revokeRefreshToken bool) (err error)
- type HanlderOption
- type HanlderOptions
- type RevokerOption
- type RevokerOptions
- type SuccessOption
- type SuccessOptions
- type TokenRevokeSuccessHandler
- type TokenRevokingLogoutHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultAccessRevoker ¶
type DefaultAccessRevoker struct {
// contains filtered or unexported fields
}
DefaultAccessRevoker implements auth.AccessRevoker
func NewDefaultAccessRevoker ¶
func NewDefaultAccessRevoker(opts ...RevokerOptions) *DefaultAccessRevoker
func (DefaultAccessRevoker) RevokeWithClientId ¶
func (DefaultAccessRevoker) RevokeWithSessionId ¶
func (DefaultAccessRevoker) RevokeWithTokenValue ¶
func (r DefaultAccessRevoker) RevokeWithTokenValue(ctx context.Context, tokenValue string, hint auth.RevokerTokenHint) error
func (DefaultAccessRevoker) RevokeWithUsername ¶
type HanlderOption ¶
type HanlderOption struct {
Revoker auth.AccessRevoker
}
type HanlderOptions ¶
type HanlderOptions func(opt *HanlderOption)
type RevokerOption ¶
type RevokerOption struct { AuthRegistry auth.AuthorizationRegistry SessionName string SessionStore session.Store TokenStoreReader oauth2.TokenStoreReader }
type RevokerOptions ¶
type RevokerOptions func(opt *RevokerOption)
type SuccessOption ¶
type SuccessOptions ¶
type SuccessOptions func(opt *SuccessOption)
type TokenRevokeSuccessHandler ¶
type TokenRevokeSuccessHandler struct {
// contains filtered or unexported fields
}
TokenRevokeSuccessHandler implements security.AuthenticationSuccessHandler
func NewTokenRevokeSuccessHandler ¶
func NewTokenRevokeSuccessHandler(opts ...SuccessOptions) *TokenRevokeSuccessHandler
func (TokenRevokeSuccessHandler) HandleAuthenticationSuccess ¶
func (h TokenRevokeSuccessHandler) HandleAuthenticationSuccess(ctx context.Context, r *http.Request, rw http.ResponseWriter, from, to security.Authentication)
type TokenRevokingLogoutHandler ¶
type TokenRevokingLogoutHandler struct {
// contains filtered or unexported fields
}
TokenRevokingLogoutHandler *
- GET method: used for logout by the session controlled clients. The client send user to this endpoint and the session
- is invalidated. As a result, the tokens controlled by this session is invalidated (See the NfvClientDetails.useSessionTimeout
- properties). It's also used by SSO logout (OIDC, and SAML GET Binding). In those case, the session is invalidated, and the
- token controlled by the session is invalidated in the same way. *
- POST method: used for logout by SSO logout (SAML POST Binding). The session is invalidated, and the token controlled
- by the session is invalidated (same as the GET method). *
- PUT/DELETE method: used for token revocation. Typically for service login or token revocation. We grab token
- from header and revoke this only this token. *
- @author Livan Du
- Created on 2018-05-04
func NewTokenRevokingLogoutHandler ¶
func NewTokenRevokingLogoutHandler(opts ...HanlderOptions) *TokenRevokingLogoutHandler
func (TokenRevokingLogoutHandler) HandleLogout ¶
func (h TokenRevokingLogoutHandler) HandleLogout(ctx context.Context, r *http.Request, rw http.ResponseWriter, auth security.Authentication) error
Click to show internal directories.
Click to hide internal directories.