diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 9026300..252b80d 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,11 @@
-
+
-
-
+
+
+
@@ -154,7 +155,6 @@
-
@@ -179,9 +179,21 @@
-
+
+
true
+
+
+
+
+ file://$PROJECT_DIR$/pkg/internal/services/ticket_token.go
+ 105
+
+
+
+
+
\ No newline at end of file
diff --git a/go.mod b/go.mod
index adc109b..a2e4e82 100644
--- a/go.mod
+++ b/go.mod
@@ -3,7 +3,7 @@ module git.solsynth.dev/hydrogen/passport
go 1.23.2
require (
- git.solsynth.dev/hypernet/nexus v0.0.0-20241026162044-3d487fa48baf
+ git.solsynth.dev/hypernet/nexus v0.0.0-20241030154425-f9b6cd2e2027
git.solsynth.dev/hypernet/pusher v0.0.0-20241026153052-cd2c326efa4e
github.com/dgraph-io/ristretto v0.1.1
github.com/eko/gocache/lib/v4 v4.1.6
diff --git a/go.sum b/go.sum
index 4b49961..b148a32 100644
--- a/go.sum
+++ b/go.sum
@@ -35,6 +35,12 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
git.solsynth.dev/hypernet/nexus v0.0.0-20241026162044-3d487fa48baf h1:Fil1ASTvxmqFySD3OoptC7uRXEYpWLwLfjlkWZNNwVQ=
git.solsynth.dev/hypernet/nexus v0.0.0-20241026162044-3d487fa48baf/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241030153633-427c83e38fe4 h1:UTptbxd2b6RFKu0tr2RmQjNnqde/M0JVO4nZk7ntUYo=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241030153633-427c83e38fe4/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241030153909-06c5fadb42c7 h1:fftdwNCLtrFGd3r0drgqrbzJphWh5Oo4A1RHRf1tu5w=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241030153909-06c5fadb42c7/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241030154425-f9b6cd2e2027 h1:F0mKuUpoRm+Nj0M4xNa2CkrXSmeONpIHwrvzwSKeux4=
+git.solsynth.dev/hypernet/nexus v0.0.0-20241030154425-f9b6cd2e2027/go.mod h1:fXQsHXGio+7/0U95IitKF07wS4yTdCMp5ms8wpFBwVI=
git.solsynth.dev/hypernet/pusher v0.0.0-20241026153052-cd2c326efa4e h1:DtHhMjgxS/spUt/KEdbRFtaVnepI6Vx8pbHdJaNH1hs=
git.solsynth.dev/hypernet/pusher v0.0.0-20241026153052-cd2c326efa4e/go.mod h1:XHTqFU/vBe4JiuAjl87GUcL8+w/IizSNoqH6n3WkQFc=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
diff --git a/pkg/internal/services/ticket_token.go b/pkg/internal/services/ticket_token.go
index 487c838..55a4e54 100644
--- a/pkg/internal/services/ticket_token.go
+++ b/pkg/internal/services/ticket_token.go
@@ -102,10 +102,12 @@ func RefreshToken(token string) (atk, rtk string, err error) {
}
var ticket models.AuthTicket
- var claims PayloadClaims
- if claims, err = sec.ReadJwt[PayloadClaims](EReader, token); err != nil {
+ var claims *PayloadClaims
+ if claims, err = sec.ReadJwt(EReader, token, &PayloadClaims{}); err != nil {
return
- } else if claims.Type != JwtRefreshType {
+ }
+
+ if claims.Type != JwtRefreshType {
err = fmt.Errorf("invalid token type, expected refresh token")
return
} else if err = database.C.Where(models.AuthTicket{