local

package
v0.2.33 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 10 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 provides OpenAPI based authorization middleware.

func NewAuthorizer

func NewAuthorizer(authenticator *oauth2.Authenticator, rbac *rbac.RBAC) *Authorizer

NewAuthorizer returns a new authorizer with required parameters.

func (*Authorizer) Authorize

func (a *Authorizer) Authorize(authentication *openapi3filter.AuthenticationInput) (string, *openapi.Userinfo, error)

Authorize checks the request against the OpenAPI security scheme.

func (*Authorizer) GetACL added in v0.2.20

func (a *Authorizer) GetACL(ctx context.Context, organizationID, subject string) (*openapi.Acl, error)

GetACL retrieves access control information from the subject identified by the Authorize call.

Jump to

Keyboard shortcuts

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