gRPC

package
v0.0.0-...-37a2b90 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2020 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AuthMetaKey    = "authorization"
	UserContextKey = "user_id"
)

Variables

This section is empty.

Functions

Types

type AuthClientInterceptor

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

func NewAuthClientInterceptor

func NewAuthClientInterceptor(authEndpoint string) *AuthClientInterceptor

func (*AuthClientInterceptor) Stream

Stream returns a client interceptor to authenticate stream RPC

func (*AuthClientInterceptor) Unary

Unary returns a client interceptor to authenticate unary RPC

type AuthServerInterceptor

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

func NewAuthServerInterceptor

func NewAuthServerInterceptor(jwt *jwt.TokenManager, accessRoles map[string][]model.UserRole) *AuthServerInterceptor

func (*AuthServerInterceptor) Stream

Stream returns a server interceptor function to authenticate and authorize stream RPC

func (*AuthServerInterceptor) Unary

Unary returns a server interceptor function to authenticate and authorize unary RPC

Jump to

Keyboard shortcuts

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