auth

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractJWT added in v0.2.0

func ExtractJWT(jwtTokenfunc func(string) string) (string, error)

Types

type OpaAuther

type OpaAuther struct {
	// contains filtered or unexported fields
}

OpaAuther is a gRPC server authorizer using OPA as backend

func NewOpaAuther

func NewOpaAuther(log *zap.SugaredLogger, secret string) (*OpaAuther, error)

NewOpaAuther creates an OPA authorizer

func (*OpaAuther) WrapStreamingClient added in v0.2.0

func (o *OpaAuther) WrapStreamingClient(next connect.StreamingClientFunc) connect.StreamingClientFunc

func (*OpaAuther) WrapStreamingHandler added in v0.2.0

func (o *OpaAuther) WrapStreamingHandler(next connect.StreamingHandlerFunc) connect.StreamingHandlerFunc

WrapStreamingHandler is a Opa StreamServerInterceptor for the server. Only one stream interceptor can be installed. If you want to add extra functionality you might decorate this function.

func (*OpaAuther) WrapUnary added in v0.2.0

func (o *OpaAuther) WrapUnary(next connect.UnaryFunc) connect.UnaryFunc

WrapUnary is a Opa UnaryServerInterceptor for the server. Only one unary interceptor can be installed. If you want to add extra functionality you might decorate this function.

Jump to

Keyboard shortcuts

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