backends

package
v0.59.4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 3 Imported by: 3 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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