backends

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	RunWithContext(context.Context) error

	Logon(ctx context.Context, audience string, username string, password string) (success bool, userID *string, sessionRef *string, user UserFromBackend, err error)
	GetUser(ctx context.Context, userID string, sessionRef *string, requestedScopes map[string]bool) (user UserFromBackend, err error)

	ResolveUserByUsername(ctx context.Context, username string) (user UserFromBackend, err error)

	RefreshSession(ctx context.Context, userID string, sessionRef *string, claims map[string]interface{}) error
	DestroySession(ctx context.Context, sessionRef *string) error

	UserClaims(userID string, authorizedScopes map[string]bool) map[string]interface{}
	ScopesSupported() []string
	ScopesMeta() *scopes.Scopes

	Name() string
}

A Backend is an identifier Backend providing functionality to logon and to fetch user meta data.

type UserFromBackend

type UserFromBackend interface {
	identity.UserWithUsername
	BackendClaims() map[string]interface{}
	BackendScopes() []string
	RequiredScopes() []string
}

UserFromBackend are users as provided by backends which can have additional claims together with a user name.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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