auth

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package auth provides authentication and authorization for RPCs.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotAllowed is returned when the given user is not allowed for the access.
	ErrNotAllowed = errors.New("method is not allowed for this user")

	// ErrUnexpectedStatusCode is returned when the response code is not 200 from the webhook.
	ErrUnexpectedStatusCode = errors.New("unexpected status code from webhook")

	// ErrWebhookTimeout is returned when the webhook does not respond in time.
	ErrWebhookTimeout = errors.New("webhook timeout")
)

Functions

func AccessAttributes

func AccessAttributes(pack *change.Pack) []types.AccessAttribute

AccessAttributes returns an array of AccessAttribute from the given pack.

func VerifyAccess

func VerifyAccess(ctx context.Context, be *backend.Backend, accessInfo *types.AccessInfo) error

VerifyAccess verifies the given access.

Types

This section is empty.

Jump to

Keyboard shortcuts

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