wip: jwt
This commit is contained in:
11
internal/model/enum/privilege.go
Normal file
11
internal/model/enum/privilege.go
Normal file
@ -0,0 +1,11 @@
|
||||
package enum
|
||||
|
||||
type Privilege string
|
||||
|
||||
const (
|
||||
PrivilegeAll Privilege = "*"
|
||||
PrivilegeUserCreate Privilege = "user:create"
|
||||
PrivilegeUserRead Privilege = "user:read"
|
||||
PrivilegeUserUpdate Privilege = "user:update"
|
||||
PrivilegeUserDelete Privilege = "user:delete"
|
||||
)
|
8
internal/model/enum/role.go
Normal file
8
internal/model/enum/role.go
Normal file
@ -0,0 +1,8 @@
|
||||
package enum
|
||||
|
||||
type UserRole string
|
||||
|
||||
const (
|
||||
UserRoleAdmin UserRole = "admin"
|
||||
UserRoleUser UserRole = "user"
|
||||
)
|
9
internal/model/enum/twoFactor.go
Normal file
9
internal/model/enum/twoFactor.go
Normal file
@ -0,0 +1,9 @@
|
||||
package enum
|
||||
|
||||
type TwoFactor string
|
||||
|
||||
const (
|
||||
TwoFactorEmail TwoFactor = "email"
|
||||
TwoFactorSMS TwoFactor = "sms"
|
||||
TwoFactorGoogle TwoFactor = "google" // 2fa with google authenticator
|
||||
)
|
Reference in New Issue
Block a user