auth

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetContext

func SetContext(ctx context.Context, contxt *Context) context.Context

Types

type Auth

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

func NewAuth

func NewAuth(jwksUri string, logger2 *logger.Logger, policy *rego.Rego) (*Auth, error)

func (*Auth) ParseAndVerify

func (a *Auth) ParseAndVerify(token string) (map[string]interface{}, error)

func (*Auth) RefreshJWKS

func (a *Auth) RefreshJWKS() error

func (*Auth) StreamInterceptor

func (a *Auth) StreamInterceptor() grpc.StreamServerInterceptor

func (*Auth) UnaryInterceptor

func (a *Auth) UnaryInterceptor() grpc.UnaryServerInterceptor

type Context

type Context struct {
	Claims  map[string]interface{}
	Method  string
	Request map[string]interface{}
	Headers map[string]string
}

func GetContext

func GetContext(ctx context.Context) (*Context, bool)

Jump to

Keyboard shortcuts

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