security

package
v0.0.0-...-05145c8 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package security describes the authentication technology that the middleware investigates to autofill the principal in a log request.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FromRawJWT

type FromRawJWT struct {
	FromRawJWT []*v1alpha1.FromRawJWT
}

FromRawJWT contains the information needed to retrieve the principal from a raw JWT.

func (*FromRawJWT) RequestPrincipal

func (j *FromRawJWT) RequestPrincipal(ctx context.Context) (string, error)

RequestPrincipal extracts the JWT principal from the grpcmetadata in the context. This method does not verify the JWT.

type GRPCContext

type GRPCContext interface {
	RequestPrincipal(context.Context) (string, error)
}

GRPCContext is an interface that retrieves the principal from a gRPC security context. A gRPC security context describes the technology used to authenticate a principal (e.g. JWT).

Jump to

Keyboard shortcuts

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