auth

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterServer added in v0.1.0

func RegisterServer(gRPCServer *grpc.Server, useCases interfaces.UseCases, logger *slog.Logger)

RegisterServer handler (serverAPI) for AuthServer to gRPC server:.

Types

type ServerAPI

type ServerAPI struct {
	// Helps to test single endpoints, if others is not implemented yet
	sso.UnimplementedAuthServiceServer
	// contains filtered or unexported fields
}

func (*ServerAPI) Login

func (api *ServerAPI) Login(ctx context.Context, request *sso.LoginRequest) (*sso.LoginResponse, error)

Login handler authenticates user if provided credentials are valid and logs User in system.

func (*ServerAPI) RefreshTokens added in v0.1.0

func (api *ServerAPI) RefreshTokens(
	ctx context.Context,
	request *sso.RefreshTokensRequest,
) (*sso.LoginResponse, error)

RefreshTokens handler updates User auth tokens.

func (*ServerAPI) Register

func (api *ServerAPI) Register(ctx context.Context, request *sso.RegisterRequest) (*sso.RegisterResponse, error)

Register handler registers new User with provided data.

Jump to

Keyboard shortcuts

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