revoke

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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 (r DefaultAccessRevoker) RevokeWithClientId(ctx context.Context, clientId string, revokeRefreshToken bool) error

func (DefaultAccessRevoker) RevokeWithSessionId

func (r DefaultAccessRevoker) RevokeWithSessionId(ctx context.Context, sessionId string, sessionName string) (err error)

func (DefaultAccessRevoker) RevokeWithTokenValue

func (r DefaultAccessRevoker) RevokeWithTokenValue(ctx context.Context, tokenValue string, hint auth.RevokerTokenHint) error

func (DefaultAccessRevoker) RevokeWithUsername

func (r DefaultAccessRevoker) RevokeWithUsername(ctx context.Context, username string, revokeRefreshToken bool) (err error)

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 SuccessOption struct {
	ClientStore             oauth2.OAuth2ClientStore
	RedirectWhitelist       utils.StringSet
	WhitelabelErrorPath     string
	WhitelabelLoggedOutPath string
}

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL