-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject OAuth2GatewayCookie #539
base: main
Are you sure you want to change the base?
Inject OAuth2GatewayCookie #539
Conversation
4a4db41
to
afbb9a1
Compare
gateway-ha/src/main/java/io/trino/gateway/ha/router/OAuth2GatewayCookie.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/OAuth2GatewayCookieProvider.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/OAuth2GatewayCookieProvider.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/OAuth2GatewayCookieProvider.java
Outdated
Show resolved
Hide resolved
afbb9a1
to
cb97cee
Compare
|
||
import static java.util.Objects.requireNonNull; | ||
|
||
public class OAuth2GatewayCookieProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we need a new class as the logic is pretty simple. Why not putting deletePaths
& ttl
on fields in ProxyRequestHandler
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do this. It seemed cleaner to keep the oauth2 cookie configuration out of ProxyRequestHandler
since it does not use it directly. How do you typically draw the line between injecting vs plumbing configuration properties through by hand?
cb97cee
to
69054ca
Compare
Description
Use injection to configure and provide OAuth2GatewayCookie.
Additional context and related issues
OAuth2GatewayCookie is configured in a non-standard way due to the previous usage of Dropwizard. This
can be refactored to use normal injection. There should be no functional changes as a result of this PR.
Release notes
( x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: