authenticator

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	// AuthenticateRequest takes request, verifies certain properties
	// and returns relevant UserInfo to be interpreted by the Authorizer
	// or error upon verification error
	AuthenticateRequest(r *http.Request) *user.UserInfo
}

type KeycloakAuthenticator

type KeycloakAuthenticator struct {
	// contains filtered or unexported fields
}

func NewKeycloakAuthenticator

func NewKeycloakAuthenticator(httpjwks bool, issuerURL string, audience string) (*KeycloakAuthenticator, error)

newKeycloakAuthenticator (https bool, jwks string, redirect string)

get keyfunc based on https

func (*KeycloakAuthenticator) AuthenticateRequest

func (a *KeycloakAuthenticator) AuthenticateRequest(r *http.Request) *user.UserInfo

type KeycloakClaim

type KeycloakClaim struct {
	RealmAccess RealmAccessSubclaim `json:"realm_access"`
	jwt.RegisteredClaims
}

type NullAuthenticator

type NullAuthenticator struct{}

func NewNullAuthenticator

func NewNullAuthenticator() *NullAuthenticator

func (*NullAuthenticator) AuthenticateRequest

func (a *NullAuthenticator) AuthenticateRequest(r *http.Request) *user.UserInfo

type RealmAccessSubclaim

type RealmAccessSubclaim struct {
	Roles []string `json:"roles"`
}

Jump to

Keyboard shortcuts

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