https://github.com/danielblagy/jwt-users-auth
https://github.com/danielblagy/jwt-users-auth
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/danielblagy/jwt-users-auth
- Owner: danielblagy
- License: mit
- Created: 2024-07-06T13:12:28.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-07-06T15:02:32.000Z (almost 2 years ago)
- Last Synced: 2025-03-24T03:35:15.014Z (over 1 year ago)
- Language: Go
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# jwt-users-auths
## Get package
```
go get github.com/danielblagy/jwt-users-auth
```
## Generate password hash
```
import "github.com/danielblagy/jwt-users-auth/hash"
func main() {
...
passwordHash, err := hash.CreatePasswordHash(userPassword)
if err != nil {
return errors.Wrap(err, "can't create password hash")
}
...
}
```
Users storage must have user's hashed passwords.
## auth.AuthService
To use the service you must implement auth.BlacklistStore and auth.UsersProvider interfaces.