Skip to content

Commit

Permalink
Small updates
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Apr 12, 2024
1 parent 302699e commit 415c6eb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
# See https://github.com/cristalhq/.github/.github/workflows
jobs:
build:
uses: cristalhq/.github/.github/workflows/build.yml@v0.6.0
uses: cristalhq/.github/.github/workflows/build.yml@v0.8.1

vuln:
uses: cristalhq/.github/.github/workflows/vuln.yml@v0.6.0
uses: cristalhq/.github/.github/workflows/vuln.yml@v0.8.1
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 415c6eb

Please sign in to comment.