api

package
v0.0.0-...-feb181f Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {

	// TODO: update the return value so it can carry a message in the DENY case
	Authenticate(context.Context, transport.Transporter) (*Identity, Decision)
}

type Decision

type Decision string
const (
	Allow  Decision = "ALLOW"
	Deny   Decision = "DENY"
	Ignore Decision = "IGNORE"
)

type Identity

type Identity struct {

	// TODO: do we even need the tenant id?
	Tenant string `yaml:"tenant"`

	Principal string   `yaml:"principal"`
	Groups    []string `yaml:"groups"`

	// TODO: If we explicitly represent reporters in the database, do we need to distinguish them when they authenticate?
	IsReporter bool   `yaml:"is_reporter"`
	Type       string `yaml:"type"`
	Href       string `yaml:"href"`
	IsGuest    bool   `yaml:"is_guest"`
}

Identity is the identity of the requester

Jump to

Keyboard shortcuts

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