mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-24 14:15:07 +00:00
chore(deps): upgrade to node 24 and go 1.26.0 (#1328)
Co-authored-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
|
||||
"github.com/pocket-id/pocket-id/backend/internal/common"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/model"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/utils"
|
||||
jwkutils "github.com/pocket-id/pocket-id/backend/internal/utils/jwk"
|
||||
testutils "github.com/pocket-id/pocket-id/backend/internal/utils/testing"
|
||||
)
|
||||
@@ -305,7 +304,7 @@ func TestGenerateVerifyAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "user123"},
|
||||
Email: utils.Ptr("user@example.com"),
|
||||
Email: new("user@example.com"),
|
||||
IsAdmin: false,
|
||||
}
|
||||
|
||||
@@ -341,7 +340,7 @@ func TestGenerateVerifyAccessToken(t *testing.T) {
|
||||
|
||||
adminUser := model.User{
|
||||
Base: model.Base{ID: "admin123"},
|
||||
Email: utils.Ptr("admin@example.com"),
|
||||
Email: new("admin@example.com"),
|
||||
IsAdmin: true,
|
||||
}
|
||||
|
||||
@@ -393,7 +392,7 @@ func TestGenerateVerifyAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "eddsauser123"},
|
||||
Email: utils.Ptr("eddsauser@example.com"),
|
||||
Email: new("eddsauser@example.com"),
|
||||
IsAdmin: true,
|
||||
}
|
||||
|
||||
@@ -430,7 +429,7 @@ func TestGenerateVerifyAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "ecdsauser123"},
|
||||
Email: utils.Ptr("ecdsauser@example.com"),
|
||||
Email: new("ecdsauser@example.com"),
|
||||
IsAdmin: true,
|
||||
}
|
||||
|
||||
@@ -467,7 +466,7 @@ func TestGenerateVerifyAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "rsauser123"},
|
||||
Email: utils.Ptr("rsauser@example.com"),
|
||||
Email: new("rsauser@example.com"),
|
||||
IsAdmin: true,
|
||||
}
|
||||
|
||||
@@ -502,7 +501,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
t.Run("generates and verifies ID token with standard claims", func(t *testing.T) {
|
||||
service, _, _ := setupJwtService(t, mockConfig)
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "user123",
|
||||
"name": "Test User",
|
||||
"email": "user@example.com",
|
||||
@@ -539,7 +538,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
t.Run("can accept expired tokens if told so", func(t *testing.T) {
|
||||
service, _, _ := setupJwtService(t, mockConfig)
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "user123",
|
||||
"name": "Test User",
|
||||
"email": "user@example.com",
|
||||
@@ -587,7 +586,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
t.Run("generates and verifies ID token with nonce", func(t *testing.T) {
|
||||
service, _, _ := setupJwtService(t, mockConfig)
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "user456",
|
||||
"name": "Another User",
|
||||
}
|
||||
@@ -612,7 +611,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
t.Run("fails verification with incorrect issuer", func(t *testing.T) {
|
||||
service, _, _ := setupJwtService(t, mockConfig)
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "user789",
|
||||
}
|
||||
tokenString, err := service.GenerateIDToken(userClaims, "client-789", "")
|
||||
@@ -634,7 +633,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
require.True(t, ok)
|
||||
assert.Equal(t, origKeyID, loadedKeyID, "Loaded key should have the same ID as the original")
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "eddsauser456",
|
||||
"name": "EdDSA User",
|
||||
"email": "eddsauser@example.com",
|
||||
@@ -672,7 +671,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
require.True(t, ok)
|
||||
assert.Equal(t, origKeyID, loadedKeyID, "Loaded key should have the same ID as the original")
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "ecdsauser456",
|
||||
"email": "ecdsauser@example.com",
|
||||
}
|
||||
@@ -709,7 +708,7 @@ func TestGenerateVerifyIdToken(t *testing.T) {
|
||||
require.True(t, ok)
|
||||
assert.Equal(t, origKeyID, loadedKeyID, "Loaded key should have the same ID as the original")
|
||||
|
||||
userClaims := map[string]interface{}{
|
||||
userClaims := map[string]any{
|
||||
"sub": "rsauser456",
|
||||
"name": "RSA User",
|
||||
"email": "rsauser@example.com",
|
||||
@@ -742,7 +741,7 @@ func TestGenerateVerifyOAuthAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "user123"},
|
||||
Email: utils.Ptr("user@example.com"),
|
||||
Email: new("user@example.com"),
|
||||
}
|
||||
const clientID = "test-client-123"
|
||||
|
||||
@@ -825,7 +824,7 @@ func TestGenerateVerifyOAuthAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "eddsauser789"},
|
||||
Email: utils.Ptr("eddsaoauth@example.com"),
|
||||
Email: new("eddsaoauth@example.com"),
|
||||
}
|
||||
const clientID = "eddsa-oauth-client"
|
||||
|
||||
@@ -862,7 +861,7 @@ func TestGenerateVerifyOAuthAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "ecdsauser789"},
|
||||
Email: utils.Ptr("ecdsaoauth@example.com"),
|
||||
Email: new("ecdsaoauth@example.com"),
|
||||
}
|
||||
const clientID = "ecdsa-oauth-client"
|
||||
|
||||
@@ -899,7 +898,7 @@ func TestGenerateVerifyOAuthAccessToken(t *testing.T) {
|
||||
|
||||
user := model.User{
|
||||
Base: model.Base{ID: "rsauser789"},
|
||||
Email: utils.Ptr("rsaoauth@example.com"),
|
||||
Email: new("rsaoauth@example.com"),
|
||||
}
|
||||
const clientID = "rsa-oauth-client"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user