Documentation ¶
Overview ¶
Package server implements the gRPC server for the authentication service.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { pb.UnimplementedAuthServiceServer DB *db.Queries Logger *zap.Logger SecretKey []byte }
Server represents the gRPC server for authentication.
func (*Server) Login ¶
func (s *Server) Login(ctx context.Context, req *pb.LoginRequest) (*pb.LoginResponse, error)
Login handles user authentication and returns a JWT token upon successful login.
func (*Server) ValidateToken ¶
func (s *Server) ValidateToken(ctx context.Context, req *pb.ValidateTokenRequest) (*pb.ValidateTokenResponse, error)
ValidateToken verifies the provided JWT token and returns the associated user ID if valid.
type VerifyTokenResponse ¶
Click to show internal directories.
Click to hide internal directories.