Skip to content

Commit

Permalink
Small updates (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg authored Apr 12, 2024
1 parent a07bb1e commit 3521250
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ See [docs][pkg-url] or [GUIDE.md](https://github.com/cristalhq/paseto/blob/main/

## Install

Go version 1.18+
Go version 1.21+

```
go get github.com/cristalhq/paseto
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module paseto

go 1.18
go 1.21
28 changes: 14 additions & 14 deletions paseto.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@ package paseto

import "encoding/json"

type TokenType uint

const (
TokenUnknown TokenType = 0
TokenV1Local TokenType = 1
TokenV1Public TokenType = 2
TokenV2Local TokenType = 3
TokenV2Public TokenType = 4
TokenV3Local TokenType = 5
TokenV3Public TokenType = 6
TokenV4Local TokenType = 7
TokenV4Public TokenType = 8
)

type Token struct {
typ TokenType
raw []byte
Expand Down Expand Up @@ -67,17 +81,3 @@ func (t *Token) DecodeFooter(dst any) error {
func (t *Token) isValid() bool {
return t != nil && len(t.raw) > 0
}

type TokenType uint

const (
TokenUnknown TokenType = 0
TokenV1Local TokenType = 1
TokenV1Public TokenType = 2
TokenV2Local TokenType = 3
TokenV2Public TokenType = 4
TokenV3Local TokenType = 5
TokenV3Public TokenType = 6
TokenV4Local TokenType = 7
TokenV4Public TokenType = 8
)

0 comments on commit 3521250

Please sign in to comment.