handler

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ClientNotFoundErr is returned when client_id does not exists.
	ClientNotFoundErr = status.Error(codes.NotFound, "client not found")

	// InvalidCredentialsErr is returned when client_id or client_secret is invalid.
	InvalidCredentialsErr = status.Error(codes.InvalidArgument, "invalid credentials")
)

Functions

This section is empty.

Types

type Auth

type Auth interface {
	Authenticate(ctx context.Context, req *authz.AuthenticateRequest) (*authz.AuthenticateResponse, error)
}

func NewAuth

func NewAuth(
	clientManager manager.Client,
	tokenManager jwt.Manager,
) Auth

type Check

type Check interface {
	Check(ctx context.Context, req *authz.CheckRequest) (*authz.CheckResponse, error)
}

func NewCheck

func NewCheck(
	compiledManager manager.CompiledPolicy,
	logger *slog.Logger,
	dispatcher event.Dispatcher,
) Check

type Policy

func NewPolicy

func NewPolicy(
	policyManager manager.Policy,
) Policy

type Principal

func NewPrincipal

func NewPrincipal(
	principalManager manager.Principal,
) Principal

type Resource

func NewResource

func NewResource(
	resourceManager manager.Resource,
) Resource

type Role

func NewRole

func NewRole(
	roleManager manager.Role,
) Role

Jump to

Keyboard shortcuts

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