firewall

package
v0.0.0-...-e62b3d3 Latest Latest
Warning

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

Go to latest
Published: May 29, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	Subject       string    `json:"sub"`
	GrantedScopes []string  `json:"scopes"`
	Issuer        string    `json:"iss"`
	Audience      string    `json:"aud"`
	IssuedAt      time.Time `json:"iat"`
	ExpiresAt     time.Time `json:"exp"`
}

type Firewall

type Firewall interface {
	Authorized(ctx context.Context, token string, scopes ...string) (*Context, error)
	HTTPAuthorized(ctx context.Context, r *http.Request, scopes ...string) (*Context, error)

	ActionAllowed(ctx context.Context, token string, accessRequest *ladon.Request, scopes ...string) (*Context, error)
	HTTPActionAllowed(ctx context.Context, r *http.Request, accessRequest *ladon.Request, scopes ...string) (*Context, error)
}

Jump to

Keyboard shortcuts

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