access

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFailedToEncodeAccessRequest = errors.New("failed to encode access request")
	ErrForbidden                   = errors.New("forbidden")
	ErrUnknownResponse             = errors.New("unknown response from access")

	ErrScopeInvalidFormat = errors.New("invalid format for scope")
)

Functions

func NewClient

func NewClient(logger logging.Logger, serviceURL string, client *http.Client) (common.Authorizer, error)

Types

type AccessCheck

type AccessCheck struct {
	CheckID  string `json:"checkID,omitempty"`
	Resource string `json:"resource,omitempty"`
	Action   string `json:"action,omitempty"`
}

AccessCheck Request for if the subject has access.

type AccessRequest

type AccessRequest struct {
	// UUID v4
	SubjectID string `json:"subjectID,omitempty"`
	// UUID v4
	TenantID string `json:"tenantID,omitempty"`
	// UUID v4
	OrganizationID string        `json:"organizationID,omitempty"`
	Checks         []AccessCheck `json:"checks,omitempty"`
}

AccessRequest Request for if the subject has access.

func ClaimsToAccessRequest

func ClaimsToAccessRequest(claims *middleware.TumblerClaims) (*AccessRequest, error)

type Config

type Config struct {
	Server string
}

Jump to

Keyboard shortcuts

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