Skip to content

Commit 3ad64db

Browse files
zepatrikory-bot
authored andcommitted
fix: transactions managed by fosite were not working
GitOrigin-RevId: ea68bd0726c608fa13e33ac09f81ac9ead26cb3a
1 parent 5b0360d commit 3ad64db

File tree

89 files changed

+515
-1365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+515
-1365
lines changed

consent/helper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"testing"
1212
"time"
1313

14-
"github.com/golang/mock/gomock"
14+
"go.uber.org/mock/gomock"
1515

1616
"github.com/ory/hydra/v2/internal/mock"
1717

driver/registry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
"github.com/ory/hydra/v2/client"
1616
"github.com/ory/hydra/v2/consent"
1717
"github.com/ory/hydra/v2/driver/config"
18+
"github.com/ory/hydra/v2/fosite"
1819
"github.com/ory/hydra/v2/internal/kratos"
1920
"github.com/ory/hydra/v2/jwk"
2021
"github.com/ory/hydra/v2/oauth2"
@@ -45,6 +46,8 @@ type registry interface {
4546
x.NetworkProvider
4647

4748
kratos.Provider
49+
50+
fosite.Transactional
4851
}
4952

5053
func newRegistryWithoutInit(c *config.DefaultProvider, l *logrusx.Logger) (*RegistrySQL, error) {

fosite/compose/compose_oauth2.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func OAuth2AuthorizeExplicitFactory(config fosite.Configurator, storage fosite.S
1919
oauth2.AuthorizeCodeStrategyProvider
2020
}),
2121
Storage: storage.(interface {
22+
fosite.Transactional
2223
oauth2.AuthorizeCodeStorageProvider
2324
oauth2.AccessTokenStorageProvider
2425
oauth2.RefreshTokenStorageProvider
@@ -47,6 +48,7 @@ func OAuth2RefreshTokenGrantFactory(config fosite.Configurator, storage fosite.S
4748
oauth2.RefreshTokenStrategyProvider
4849
}),
4950
Storage: storage.(interface {
51+
fosite.Transactional
5052
oauth2.AccessTokenStorageProvider
5153
oauth2.RefreshTokenStorageProvider
5254
oauth2.TokenRevocationStorageProvider

fosite/compose/compose_openid.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func OpenIDConnectHybridFactory(config fosite.Configurator, storage fosite.Stora
6767
oauth2.RefreshTokenStrategyProvider
6868
}),
6969
Storage: storage.(interface {
70+
fosite.Transactional
7071
oauth2.AuthorizeCodeStorageProvider
7172
oauth2.AccessTokenStorageProvider
7273
oauth2.RefreshTokenStorageProvider

fosite/compose/compose_rfc8628.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ func RFC8628DeviceAuthorizationTokenFactory(config fosite.Configurator, storage
4141
oauth2.RefreshTokenStrategyProvider
4242
}),
4343
Storage: storage.(interface {
44+
fosite.Transactional
4445
rfc8628.DeviceAuthStorageProvider
4546
oauth2.AccessTokenStorageProvider
4647
oauth2.RefreshTokenStorageProvider

fosite/generate-mocks.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)