auth

package
v0.0.0-...-4f56fcc Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build() fx.Option

Types

type Service

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

func (*Service) Login

func (s *Service) Login(ctx context.Context, username, password string) (*entities.AuthResult, error)

Login autentica um usuário com base em seu nome de usuário e senha. Retorna um token JWT se a autenticação for bem-sucedida.

func (*Service) Register

func (s *Service) Register(ctx context.Context, username, password string) (*entities.User, error)

Register registra um novo usuário.

func (*Service) ValidateToken

func (s *Service) ValidateToken(token string) (*entities.User, error)

ValidateToken verifica a validade do token JWT fornecido.

Jump to

Keyboard shortcuts

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