auth

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	HeaderOrg    = basic.HeaderOrg
	HeaderUser   = basic.HeaderUser
	HeaderGroups = basic.HeaderGroups
)

Variables

This section is empty.

Functions

func ContextMiddleware

func ContextMiddleware() func(http.Handler) http.Handler

ContextMiddleware extracts request information and populates the request context.

func GroupsFromContext

func GroupsFromContext(ctx context.Context) ([]string, bool)

GroupsFromContext returns the groups from the given context if one exists. If a value is found, value, true is returned, otherwise an empty string and false.

func OrgFromContext

func OrgFromContext(ctx context.Context) (string, bool)

OrgFromContext returns the org ID from the given context if one exists. If a value is found, value, true is returned, otherwise an empty string and false.

func UserFromContext

func UserFromContext(ctx context.Context) (string, bool)

UserFromContext returns the user ID from the given context if one exists. If a value is found, value, true is returned, otherwise an empty string and false.

Types

type GroupsKey

type GroupsKey struct{}

type OrgKey

type OrgKey struct{}

type UserKey

type UserKey struct{}

Directories

Path Synopsis
Package client provides primitives to interact with the openapi HTTP API.
Package client provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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