authz

package
v0.0.0-...-6254df8 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client talks to an AuthZ server. Never instantiate one directly, rather use NewClient.

func NewClient

func NewClient(pdpBaseURL string) (*Client, error)

NewClient instantiates an AuthZ client to connect to the server endpoint specified by the URL param. The pdpBaseURL is the base URL of your policy decision point, e.g. * http://your.authz/authzforce-ce/domain * https://your.authz:44300/authzforce-ce/domain we'll append the domain ID from the user token and a 'pdp' so the resulting URL will be e.g. * http://your.authz/authzforce-ce/domain/nrEEeq7c9rA/pdp * https://your.authz:44300/authzforce-ce/domain/nrEEeq7c9rA/pdp

func (*Client) Authorize

func (c *Client) Authorize(r *xacml.Request) (bool, error)

Authorize asks the AuthZ server to authorize the given request. Returns true just in case the server gave the green light, false for permission denied, and error if some technical problem happened.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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