auth

package
v0.0.0-...-01bad0f Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package auth provides authentication implementation(s) that can be used to limit access to the (gRPC) server. Specific implementations are in each sub package.

Index

Constants

View Source
const (
	MetaKeyAuthorization = "authorization"
)

Meta* are the keys to metadata.

See https://godoc.org/google.golang.org/grpc/metadata#New

Variables

View Source
var (
	// Server Side
	ErrMissingMetadata        = status.Error(codes.InvalidArgument, "missing metadata")
	ErrMissingAuthorization   = status.Error(codes.InvalidArgument, "missing authorization")
	ErrCorruptedAuthorization = status.Error(codes.InvalidArgument, "unexpected number of authentication values")
	ErrFailedToAuthenticate   = status.Error(codes.Unauthenticated, "unable to authenticate user")
	ErrCannotAuthorize        = status.Error(codes.FailedPrecondition, "cannot authorize message")
)

Err* are sentinel errors

Functions

This section is empty.

Types

type CtxKey

type CtxKey string

CtxKey is a type just to prevent collisions

const (
	CtxKeyRoles CtxKey = "roles"
)

CtxKey* are context keys specific to this auth package.

Directories

Path Synopsis
Package jwts provides various different JWT tokens.
Package jwts provides various different JWT tokens.
Package tokens provides an implementation to fetch and manage OAuth2 tokens.
Package tokens provides an implementation to fetch and manage OAuth2 tokens.
seeds
Package seeds provides a way to "seed" a token source; especially one that relies on caching.
Package seeds provides a way to "seed" a token source; especially one that relies on caching.
storage
Package storage provides storage for the cachable token interface.
Package storage provides storage for the cachable token interface.

Jump to

Keyboard shortcuts

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