Added TTL to tokens
This commit is contained in:
@@ -4,21 +4,20 @@ import "github.com/google/uuid"
|
||||
|
||||
// Access token
|
||||
type AccessToken struct {
|
||||
ISS string
|
||||
Scope string
|
||||
IAT int64
|
||||
EXP int64
|
||||
SUB int
|
||||
Fresh int64
|
||||
Roles []string
|
||||
ISS string // Issuer, generally TrustedHost
|
||||
IAT int64 // Time issued at
|
||||
EXP int64 // Time expiring at
|
||||
TTL string // Time-to-live: "session" or "exp". Used with 'remember me'
|
||||
SUB int // Subject (user) ID
|
||||
Fresh int64 // Time freshness expiring at
|
||||
}
|
||||
|
||||
// Refresh token
|
||||
type RefreshToken struct {
|
||||
ISS string
|
||||
Scope string
|
||||
IAT int64
|
||||
EXP int64
|
||||
SUB int
|
||||
JTI uuid.UUID
|
||||
ISS string // Issuer, generally TrustedHost
|
||||
IAT int64 // Time issued at
|
||||
EXP int64 // Time expiring at
|
||||
TTL string // Time-to-live: "session" or "exp". Used with 'remember me'
|
||||
SUB int // Subject (user) ID
|
||||
JTI uuid.UUID // UUID-4 used for identifying blacklisted refresh tokens
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user