backend

package
v2.0.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAccountNotFound account not found
	ErrAccountNotFound = errors.New("user not found")
	// ErrAccountDisabled account disabled
	ErrAccountDisabled = errors.New("account disabled")
	// ErrNotSupported operation not supported by user-backend
	ErrNotSupported = errors.New("operation not supported")
)

Functions

This section is empty.

Types

type RevaAuthenticator

type RevaAuthenticator interface {
	Authenticate(ctx context.Context, in *gateway.AuthenticateRequest, opts ...grpc.CallOption) (*gateway.AuthenticateResponse, error)
}

RevaAuthenticator helper interface to mock auth-method from reva gateway-client.

type UserBackend

type UserBackend interface {
	GetUserByClaims(ctx context.Context, claim, value string, withRoles bool) (*cs3.User, string, error)
	Authenticate(ctx context.Context, username string, password string) (*cs3.User, string, error)
	CreateUserFromClaims(ctx context.Context, claims map[string]interface{}) (*cs3.User, error)
	GetUserGroups(ctx context.Context, userID string)
}

UserBackend allows the proxy to retrieve users from different user-backends (accounts-service, CS3)

func NewCS3UserBackend

func NewCS3UserBackend(rs settingssvc.RoleService, ap RevaAuthenticator, machineAuthAPIKey string, oidcISS string, tokenManager token.Manager, logger log.Logger) UserBackend

NewCS3UserBackend creates a user-provider which fetches users from a CS3 UserBackend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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