auth

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 19 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(disabled bool, reqPolicy, respPolicy, jwks string, logger2 *logger.Logger) (*Auth, error)

func (*Auth) ParseAndVerify

func (a *Auth) ParseAndVerify(token string) ([]byte, 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{} `json:"claims"`
	Method       string                 `json:"method"`
	Metadata     map[string]string      `json:"metadata"`
	Body         map[string]interface{} `json:"body"`
	ClientStream bool                   `json:"client_stream"`
	ServerStream bool                   `json:"server_stream"`
	// contains filtered or unexported fields
}

func GetContext

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

func (*Context) AuthPayload

func (c *Context) AuthPayload() string

Jump to

Keyboard shortcuts

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