mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-05-30 10:25:40 +02:00
Tests
This commit is contained in:
parent
460162737a
commit
7d9f687768
3 changed files with 278 additions and 45 deletions
auth
|
@ -22,7 +22,7 @@ type Manager interface {
|
|||
|
||||
type User struct {
|
||||
Name string
|
||||
Pass string // hashed
|
||||
Hash string // password hash (bcrypt)
|
||||
Role Role
|
||||
Grants []Grant
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ func AllowedRole(role Role) bool {
|
|||
}
|
||||
|
||||
var (
|
||||
ErrUnauthorized = errors.New("unauthorized")
|
||||
ErrNotFound = errors.New("not found")
|
||||
ErrUnauthenticated = errors.New("unauthenticated")
|
||||
ErrUnauthorized = errors.New("unauthorized")
|
||||
ErrInvalidArgument = errors.New("invalid argument")
|
||||
ErrNotFound = errors.New("not found")
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue