Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Dec 3, 2024
1 parent 3811d20 commit c57da63
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions persistence/sql/persister_nid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1792,37 +1792,6 @@ func (s *PersisterTestSuite) TestRevokeRefreshToken() {
}
}

func (s *PersisterTestSuite) TestRevokeRefreshTokenMaybeGracePeriod() {
t := s.T()
for k, r := range s.registries {
t.Run(k, func(t *testing.T) {
client := &client.Client{ID: "client-id"}
require.NoError(t, r.Persister().CreateClient(s.t1, client))

request := fosite.NewRequest()
request.Client = &fosite.DefaultClient{ID: "client-id"}
request.Session = &oauth2.Session{DefaultSession: &openid.DefaultSession{Subject: "sub"}}

signature := uuid.Must(uuid.NewV4()).String()
require.NoError(t, r.Persister().CreateRefreshTokenSession(s.t1, signature, "", request))

actual := persistencesql.OAuth2RequestSQL{Table: "refresh"}

store, ok := r.Persister().(*persistencesql.Persister)
if !ok {
t.Fatal("type assertion failed")
}

require.NoError(t, store.RevokeRefreshTokenMaybeGracePeriod(s.t2, request.ID, signature))
require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, signature))
require.Equal(t, true, actual.Active)
require.NoError(t, store.RevokeRefreshTokenMaybeGracePeriod(s.t1, request.ID, signature))
require.NoError(t, r.Persister().Connection(context.Background()).Find(&actual, signature))
require.Equal(t, false, actual.Active)
})
}
}

func (s *PersisterTestSuite) TestRevokeSubjectClientConsentSession() {
t := s.T()
for k, r := range s.registries {
Expand Down

0 comments on commit c57da63

Please sign in to comment.