@@ -11,24 +11,24 @@ import (
1111
1212// OAuth2AuthorizeExplicitFactory creates an OAuth2 authorize code grant ("authorize explicit flow") handler and registers
1313// an access token, refresh token and authorize code validator.
14- func OAuth2AuthorizeExplicitFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
14+ func OAuth2AuthorizeExplicitFactory (config fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
1515 return & oauth2.AuthorizeExplicitGrantHandler {
1616 AccessTokenStrategy : strategy .(oauth2.AccessTokenStrategy ),
1717 RefreshTokenStrategy : strategy .(oauth2.RefreshTokenStrategy ),
1818 AuthorizeCodeStrategy : strategy .(oauth2.AuthorizeCodeStrategy ),
19- CoreStorage : storage .(oauth2.CoreStorage ),
20- TokenRevocationStorage : storage .(oauth2.TokenRevocationStorage ),
19+ Storage : storage .(oauth2.CoreStorage ),
20+ TokenRevocationStorage : storage .(oauth2.TokenRevocationStorageProvider ),
2121 Config : config ,
2222 }
2323}
2424
2525// OAuth2ClientCredentialsGrantFactory creates an OAuth2 client credentials grant handler and registers
2626// an access token, refresh token and authorize code validator.
27- func OAuth2ClientCredentialsGrantFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
27+ func OAuth2ClientCredentialsGrantFactory (config fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
2828 return & oauth2.ClientCredentialsGrantHandler {
2929 HandleHelper : & oauth2.HandleHelper {
3030 AccessTokenStrategy : strategy .(oauth2.AccessTokenStrategy ),
31- AccessTokenStorage : storage .(oauth2.AccessTokenStorage ),
31+ Storage : storage .(oauth2.AccessTokenStorageProvider ),
3232 Config : config ,
3333 },
3434 Config : config ,
@@ -37,7 +37,7 @@ func OAuth2ClientCredentialsGrantFactory(config fosite.Configurator, storage int
3737
3838// OAuth2RefreshTokenGrantFactory creates an OAuth2 refresh grant handler and registers
3939// an access token, refresh token and authorize code validator.nmj
40- func OAuth2RefreshTokenGrantFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
40+ func OAuth2RefreshTokenGrantFactory (config fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
4141 return & oauth2.RefreshTokenGrantHandler {
4242 AccessTokenStrategy : strategy .(oauth2.AccessTokenStrategy ),
4343 RefreshTokenStrategy : strategy .(oauth2.RefreshTokenStrategy ),
@@ -48,7 +48,7 @@ func OAuth2RefreshTokenGrantFactory(config fosite.Configurator, storage interfac
4848
4949// OAuth2AuthorizeImplicitFactory creates an OAuth2 implicit grant ("authorize implicit flow") handler and registers
5050// an access token, refresh token and authorize code validator.
51- func OAuth2AuthorizeImplicitFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
51+ func OAuth2AuthorizeImplicitFactory (config fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
5252 return & oauth2.AuthorizeImplicitGrantTypeHandler {
5353 AccessTokenStrategy : strategy .(oauth2.AccessTokenStrategy ),
5454 AccessTokenStorage : storage .(oauth2.AccessTokenStorage ),
@@ -62,12 +62,12 @@ func OAuth2AuthorizeImplicitFactory(config fosite.Configurator, storage interfac
6262// Deprecated: This factory is deprecated as a means to communicate that the ROPC grant type is widely discouraged and
6363// is at the time of this writing going to be omitted in the OAuth 2.1 spec. For more information on why this grant type
6464// is discouraged see: https://www.scottbrady91.com/oauth/why-the-resource-owner-password-credentials-grant-type-is-not-authentication-nor-suitable-for-modern-applications
65- func OAuth2ResourceOwnerPasswordCredentialsFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
65+ func OAuth2ResourceOwnerPasswordCredentialsFactory (config fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
6666 return & oauth2.ResourceOwnerPasswordCredentialsGrantHandler {
6767 ResourceOwnerPasswordCredentialsGrantStorage : storage .(oauth2.ResourceOwnerPasswordCredentialsGrantStorage ),
6868 HandleHelper : & oauth2.HandleHelper {
6969 AccessTokenStrategy : strategy .(oauth2.AccessTokenStrategy ),
70- AccessTokenStorage : storage .(oauth2.AccessTokenStorage ),
70+ Storage : storage .(oauth2.AccessTokenStorageProvider ),
7171 Config : config ,
7272 },
7373 RefreshTokenStrategy : strategy .(oauth2.RefreshTokenStrategy ),
@@ -76,17 +76,17 @@ func OAuth2ResourceOwnerPasswordCredentialsFactory(config fosite.Configurator, s
7676}
7777
7878// OAuth2TokenRevocationFactory creates an OAuth2 token revocation handler.
79- func OAuth2TokenRevocationFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
79+ func OAuth2TokenRevocationFactory (_ fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
8080 return & oauth2.TokenRevocationHandler {
81- TokenRevocationStorage : storage .(oauth2.TokenRevocationStorage ),
81+ TokenRevocationStorage : storage .(oauth2.TokenRevocationStorageProvider ),
8282 AccessTokenStrategy : strategy .(oauth2.AccessTokenStrategy ),
8383 RefreshTokenStrategy : strategy .(oauth2.RefreshTokenStrategy ),
8484 }
8585}
8686
8787// OAuth2TokenIntrospectionFactory creates an OAuth2 token introspection handler and registers
8888// an access token and refresh token validator.
89- func OAuth2TokenIntrospectionFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
89+ func OAuth2TokenIntrospectionFactory (config fosite.Configurator , storage fosite. Storage , strategy interface {}) interface {} {
9090 return & oauth2.CoreValidator {
9191 CoreStrategy : strategy .(oauth2.CoreStrategy ),
9292 CoreStorage : storage .(oauth2.CoreStorage ),
@@ -101,7 +101,7 @@ func OAuth2TokenIntrospectionFactory(config fosite.Configurator, storage interfa
101101//
102102// Due to the stateless nature of this factory, THE BUILT-IN REVOCATION MECHANISMS WILL NOT WORK.
103103// If you need revocation, you can validate JWTs statefully, using the other factories.
104- func OAuth2StatelessJWTIntrospectionFactory (config fosite.Configurator , storage interface {} , strategy interface {}) interface {} {
104+ func OAuth2StatelessJWTIntrospectionFactory (config fosite.Configurator , _ fosite. Storage , strategy interface {}) interface {} {
105105 return & oauth2.StatelessJWTValidator {
106106 Signer : strategy .(jwt.Signer ),
107107 Config : config ,
0 commit comments