auth

package
v0.0.0-...-6f9dc6e Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImpersonateAccountHeader defines the header for account
	// id impersonation.
	ImpersonateAccountHeader = "impersonate-account-id"
)

Variables

This section is empty.

Functions

func ContextWithMemberID

func ContextWithMemberID(c context.Context, aid id.MemberID) context.Context

ContextWithMemberID 使用给定的帐户ID创建上下文

func Interceptor

func Interceptor(publicKeyFile string) (grpc.UnaryServerInterceptor, error)

Interceptor 创建一个GRPC认证拦截器

func MemberIDFromContext

func MemberIDFromContext(c context.Context) (id.MemberID, error)

MemberIDFromContext gets user id from context. Returns unauthenticated error if no user id is available.

Types

This section is empty.

Jump to

Keyboard shortcuts

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