auth

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnauthenticatedOperation = errors.New("sha.rbac: unauthenticated operation")

Functions

func Use added in v0.0.5

func Use(manager Manager)

Types

type Manager

type Manager interface {
	Auth(ctx context.Context) (Subject, error)
}

type Subject

type Subject interface {
	GetID() int64
	Info(ctx context.Context) interface{}
}

func Auth

func Auth(ctx context.Context) (Subject, error)

func MustAuth

func MustAuth(ctx context.Context) Subject

Jump to

Keyboard shortcuts

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