Skip to content

Commit

Permalink
fix: comply with new fosite persister interface (#2990)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Feb 14, 2022
1 parent dec52a1 commit 4c91a39
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ require (
github.com/oleiade/reflections v1.0.1
github.com/olekukonko/tablewriter v0.0.1
github.com/ory/analytics-go/v4 v4.0.2
github.com/ory/fosite v0.40.3-0.20211013150831-5027277a8297
github.com/ory/fosite v0.42.1
github.com/ory/go-acc v0.2.6
github.com/ory/graceful v0.1.1
github.com/ory/herodot v0.9.12
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1411,8 +1411,8 @@ github.com/ory/dockertest/v3 v3.6.5/go.mod h1:iYKQSRlYrt/2s5fJWYdB98kCQG6g/LjBMv
github.com/ory/dockertest/v3 v3.8.1 h1:vU/8d1We4qIad2YM0kOwRVtnyue7ExvacPiw1yDm17g=
github.com/ory/dockertest/v3 v3.8.1/go.mod h1:wSRQ3wmkz+uSARYMk7kVJFDBGm8x5gSxIhI7NDc+BAQ=
github.com/ory/fosite v0.29.0/go.mod h1:0atSZmXO7CAcs6NPMI/Qtot8tmZYj04Nddoold4S2h0=
github.com/ory/fosite v0.40.3-0.20211013150831-5027277a8297 h1:r8t/5GYtFx8dY+OuebrxbmCh+sL9B9KW1gc4xCy9hCE=
github.com/ory/fosite v0.40.3-0.20211013150831-5027277a8297/go.mod h1:IIRYBnuhyfgmYpSwk1h56+2CI7p+605KRCiJ7olUcl0=
github.com/ory/fosite v0.42.1 h1:h2j+namO6bZIaD4WAFFHx+Cwfc8EDATE5JWQR9NMo6c=
github.com/ory/fosite v0.42.1/go.mod h1:qggrqm3ZWQF9i2f/d3RLH5mHHPtv44hsiltkVKLsCYo=
github.com/ory/go-acc v0.0.0-20181118080137-ddc355013f90/go.mod h1:sxnvPCxChFuSmTJGj8FdMupeq1BezCiEpDjTUXQ4hf4=
github.com/ory/go-acc v0.2.6 h1:YfI+L9dxI7QCtWn2RbawqO0vXhiThdXu/RgizJBbaq0=
github.com/ory/go-acc v0.2.6/go.mod h1:4Kb/UnPcT8qRAk3IAxta+hvVapdxTLWtrr7bFLlEgpw=
Expand Down
4 changes: 4 additions & 0 deletions persistence/sql/persister_oauth2.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@ func (p *Persister) RevokeRefreshToken(ctx context.Context, id string) error {
return p.deactivateSessionByRequestID(ctx, id, sqlTableRefresh)
}

func (p *Persister) RevokeRefreshTokenMaybeGracePeriod(ctx context.Context, id string, signature string) error {
return p.deactivateSessionByRequestID(ctx, id, sqlTableRefresh)
}

func (p *Persister) RevokeAccessToken(ctx context.Context, id string) error {
return p.deleteSessionByRequestID(ctx, id, sqlTableAccess)
}
Expand Down
4 changes: 4 additions & 0 deletions x/fosite_storer.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,8 @@ type FositeStorer interface {
DeleteAccessTokens(ctx context.Context, clientID string) error

FlushInactiveRefreshTokens(ctx context.Context, notAfter time.Time, limit int, batchSize int) error

// DeleteOpenIDConnectSession deletes an OpenID Connect session.
// This is duplicated from Ory Fosite to help against deprecation linting errors.
DeleteOpenIDConnectSession(ctx context.Context, authorizeCode string) error
}

0 comments on commit 4c91a39

Please sign in to comment.