authorization

package
v1.1.11 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorizer

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

Authorizer is an entity that authorizes users to an app.

func NewAuthorizer

func NewAuthorizer() *Authorizer

NewAuthorizer creates a new Authorizer.

func (*Authorizer) Authorize

func (az *Authorizer) Authorize(azi AuthzInfo) error

Authorize performs authorization.

type AuthzInfo

type AuthzInfo struct {
	App         model.AppData
	UserRole    string
	ResourceURI string
	Method      string
}

AuthzInfo holds all the data to perform authorization.

Jump to

Keyboard shortcuts

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