Added parsing of tokens

This commit is contained in:
2025-02-10 12:19:49 +11:00
parent 418cff1c4a
commit e46a55e76d
5 changed files with 287 additions and 4 deletions

24
jwt/tokens.go Normal file
View File

@@ -0,0 +1,24 @@
package jwt
import "github.com/google/uuid"
// Access token
type AccessToken struct {
ISS string
Scope string
IAT int64
EXP int64
SUB int
Fresh int64
Roles []string
}
// Refresh token
type RefreshToken struct {
ISS string
Scope string
IAT int64
EXP int64
SUB int
JTI uuid.UUID
}