server

package
v0.0.0-...-f0516e6 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthServer

type AuthServer struct {
	pb.UnimplementedAuthServiceServer
	// contains filtered or unexported fields
}

func MakeAuthServer

func MakeAuthServer(dependencies Dependencies, config Config) AuthServer

func (AuthServer) Close

func (s AuthServer) Close() error

func (AuthServer) GetAccessToken

func (server AuthServer) GetAccessToken(ctx context.Context, req *pb.GetAccessTokenRequest) (*pb.GetAccessTokenResponse, error)

func (AuthServer) GetValidationKeySet

func (server AuthServer) GetValidationKeySet(_ *empty.Empty, stream pb.AuthService_GetValidationKeySetServer) error

func (AuthServer) SignIn

func (server AuthServer) SignIn(ctx context.Context, req *pb.SignInRequest) (*pb.SignInResponse, error)

func (AuthServer) SignOut

func (server AuthServer) SignOut(ctx context.Context, req *pb.SignOutRequest) (*empty.Empty, error)

func (AuthServer) TranslateAccessToken

func (server AuthServer) TranslateAccessToken(stream pb.AuthService_TranslateAccessTokenServer) error

func (AuthServer) ValidateRequestInterceptor

func (server AuthServer) ValidateRequestInterceptor() grpc.UnaryServerInterceptor

type Config

type Config struct {
	VerifyClientCert         bool
	AccessTokenValidityTime  time.Duration
	RefreshTokenValidityTime time.Duration

	// Allows to override time.Now for testing purposes.
	Now func() time.Time
}

type Dependencies

type Dependencies struct {
	Services
	Storage      storage.Storage
	Vault        storage.Vault
	TokenManager tokens.Manager
	Dispatcher   *dispatcher.Dispatcher
	Logger       logging.Logger
	Tracer       trace.Tracer
}

type Services

type Services struct {
	User userPb.UserServiceClient
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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