This project provides a basic authentication service written in Go. It includes user registration, login, and token-based authentication.
- User registration
- User login
- Token-based authentication
- Password hashing
git clone [email protected]:Stei-ITstudents/go-auth.git
go mod init github.com/Stei-ITstudents/go-auth
go mod tidy
go run main.go
To use the authentication service, you can send HTTP requests to the provided endpoints. Below are some examples:
@curl -X POST http://localhost:8080/signup -d '{"username":"NewUser", "password":"password"}'
make
Method | Endpoint | Description |
---|---|---|
POST |
/signup | Register a new user |
POST |
/login | Login a user |
GET |
/logout | Logout a user |
GET |
/welcome | Welcome a user |