authorizer

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2020 License: GPL-2.0 Imports: 8 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 {
	AllowedEndpoint *url.URL
	Client          *http.Client
}

Authorizer uses hydra rest apis to retrieve clients

func NewAuthorizer

func NewAuthorizer(id, secret, cluster string) (*Authorizer, error)

NewAuthorizer returns a Warden authorizer connected to the hydra cluster it can fail if the cluster is not a valid url, or if the id and secret don't work

func (*Authorizer) IsAllowed added in v1.4.0

func (m *Authorizer) IsAllowed(request *ladon.Request) error

IsAllowed calls the hydra endpoint to see if a subject has the permission to perform an action

Jump to

Keyboard shortcuts

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