middleware

package
v0.0.6-beta Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticationChannel

type AuthenticationChannel chan<- AuthenticationMetadata

type AuthenticationMetadata

type AuthenticationMetadata struct {
	Account *types.ServiceAccountPayload
	Error   error
}

type Credentials

type Credentials struct {
	ClientId    uuid.UUID
	ClientToken string
}

type Middleware

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

func New

func New(auth lib.Auth, endpoints db.DatabaseEndpoints, enforcer *casbin.Enforcer, cache *bigcache.BigCache) *Middleware

func (*Middleware) ServerAuthenticationInterceptor

func (m *Middleware) ServerAuthenticationInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

func (*Middleware) SetAuthenticationContext

func (m *Middleware) SetAuthenticationContext(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error)

type ProvisionerAccount

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

func (*ProvisionerAccount) Authenticate

func (p *ProvisionerAccount) Authenticate(ctx context.Context) (interface{}, error)

type ServiceAccount

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

func (*ServiceAccount) Authenticate

func (s *ServiceAccount) Authenticate(ch <-chan context.Context, auth AuthenticationChannel)

type UserAccount

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

func (*UserAccount) Authenticate

func (u *UserAccount) Authenticate(ctx context.Context) (interface{}, error)

Jump to

Keyboard shortcuts

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