Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Jan 8, 2024
1 parent 00cc633 commit 5be68f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions oauth2/fosite_store_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1002,11 +1002,11 @@ func testFositeJWTBearerGrantStorage(x InternalRegistry) func(t *testing.T) {
})

t.Run("case=does not return expired values", func(t *testing.T) {
keySet, err := jwk.GenerateJWK(context.Background(), jose.RS256, "issuer-key", "sig")
keySet, err := jwk.GenerateJWK(context.Background(), jose.RS256, "issuer-expired-key", "sig")
require.NoError(t, err)

publicKey := keySet.Keys[0].Public()
issuer := "unlimited-issuer"
issuer := "expired-issuer"
grant := trust.Grant{
ID: uuid.New(),
Issuer: issuer,
Expand All @@ -1021,8 +1021,9 @@ func testFositeJWTBearerGrantStorage(x InternalRegistry) func(t *testing.T) {
err = grantManager.CreateGrant(context.TODO(), grant, publicKey)
require.NoError(t, err)

_, err = grantStorage.GetPublicKeys(context.TODO(), issuer, "any-subject-3")
require.ErrorIs(t, err, sqlcon.ErrNoRows)
keys, err := grantStorage.GetPublicKeys(context.TODO(), issuer, "any-subject-3")
require.NoError(t, err)
assert.Len(t, keys.Keys, 0)
})
}
}
Expand Down

0 comments on commit 5be68f7

Please sign in to comment.