authn

package
v0.0.0-...-db8f46d Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDeviceToContext

func AddDeviceToContext(c echo.Context, d database.Device)

func AddOrganizationToContext

func AddOrganizationToContext(c echo.Context, o database.Organization)

func AddStudentToContext

func AddStudentToContext(c echo.Context, s database.Student)

func AddUserToContext

func AddUserToContext(c echo.Context, u database.User)

func DeviceFromContext

func DeviceFromContext(c echo.Context) (database.Device, bool)

func DeviceLoginMiddleware

func DeviceLoginMiddleware(db *database.Wrapper, log logr.Logger) echo.MiddlewareFunc

func DeviceRegistrationLoginMiddleware

func DeviceRegistrationLoginMiddleware(db *database.Wrapper, log logr.Logger) echo.MiddlewareFunc

func OrganizationFromContext

func OrganizationFromContext(c echo.Context) (database.Organization, bool)

func StudentFromContext

func StudentFromContext(c echo.Context) (database.Student, bool)

func StudentLoginMiddleware

func StudentLoginMiddleware(db *database.Wrapper, log logr.Logger) echo.MiddlewareFunc

func UserFromContext

func UserFromContext(c echo.Context) (database.User, bool)

func UserLoginMiddleware

func UserLoginMiddleware(db *database.Wrapper, log logr.Logger) echo.MiddlewareFunc

Types

type Authorizer

type Authorizer struct {
	// contains filtered or unexported fields
}

func New

func New(log logr.Logger, dbw *database.Wrapper, secr *secrets.Wrapper) (*Authorizer, error)

func (*Authorizer) HandleLogin

func (a *Authorizer) HandleLogin(c echo.Context) error

func (*Authorizer) HandleOauth2Callback

func (a *Authorizer) HandleOauth2Callback(c echo.Context) error

func (*Authorizer) RegisterRoutes

func (a *Authorizer) RegisterRoutes(g *echo.Group)

type Issuer

type Issuer struct {
	// contains filtered or unexported fields
}

type Status

type Status string
const (
	StatusError Status = "error"
	StatusOK    Status = "ok"
)

Jump to

Keyboard shortcuts

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