zitadel-oidc/pkg/op
David Sharnoff cdf2af6c2c
feat: add CanRefreshTokenInfo to support non-JWT refresh tokens (#244)
* Add an additional, optional, op.Storage interface so that refresh tokens
that are not JWTs do not cause failures when they randomly, sometimes, decrypt
without error

```go
// CanRefreshTokenInfo is an optional additional interface that Storage can support.
// Supporting CanRefreshTokenInfo is required to be able to revoke a refresh token that
// does not happen to also be a JWTs work properly.
type CanRefreshTokenInfo interface {
        // GetRefreshTokenInfo must return oidc.ErrInvalidRefreshToken when presented
	// with a token that is not a refresh token.
	GetRefreshTokenInfo(ctx context.Context, clientID string, token string) (userID string, tokenID string, err error)
}
```

* add comment suggested in code review

* review feedback: return an error defined in op rather than adding a new error to oidc

* move ErrInvalidRefresToken to op/storage.go
2023-02-06 08:27:57 +01:00
..
mock chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
applicationtype_enumer.go chore: add enumer for iota-defined types (#197) 2022-07-25 20:06:49 +02:00
auth_request.go fix: allow http schema for redirect url for native apps in dev mode (#242) 2022-11-14 16:59:56 +01:00
auth_request_test.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
client.go chore: add enumer for iota-defined types (#197) 2022-07-25 20:06:49 +02:00
config.go chore: house cleaning of the caos name and update sec (#232) 2022-10-17 09:13:54 +02:00
config_test.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
crypto.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
discovery.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
discovery_test.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
endpoint.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
endpoint_test.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
error.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
keys.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
keys_test.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
op.go fix: exchange cors library and add X-Requested-With to Access-Control-Request-Headers (#260) 2023-01-09 10:39:11 +01:00
probes.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
session.go fix: use default redirect uri when not passed on end_session endpoint (#201) 2022-07-27 08:36:43 +02:00
signer.go fix: avoid potential race conditions (#220) 2022-10-04 07:23:59 +02:00
storage.go feat: add CanRefreshTokenInfo to support non-JWT refresh tokens (#244) 2023-02-06 08:27:57 +01:00
token.go fix: state and auth code response encoding (#185) 2022-06-21 07:24:40 +02:00
token_client_credentials.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_code.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_exchange.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_intospection.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
token_jwt_profile.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_refresh.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_request.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
token_revocation.go feat: add CanRefreshTokenInfo to support non-JWT refresh tokens (#244) 2023-02-06 08:27:57 +01:00
userinfo.go fix: move to new org (#177) 2022-04-26 23:48:29 +02:00
verifier_access_token.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00
verifier_id_token_hint.go feat: allow id token hint verifier to specify algs (#229) 2022-11-14 16:59:33 +01:00
verifier_jwt_profile.go chore(linting): apply gofumpt & goimports to all .go files (#225) 2022-10-05 09:33:10 +02:00