Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

willmostly
Copy link
Contributor

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:

@cla-bot cla-bot bot added the cla-signed label Oct 30, 2024
@willmostly willmostly force-pushed the will/inject-cookie-configuration branch from 4a4db41 to afbb9a1 Compare October 30, 2024 13:15
@ebyhr ebyhr removed their request for review October 31, 2024 00:18
@willmostly willmostly force-pushed the will/inject-cookie-configuration branch from afbb9a1 to cb97cee Compare October 31, 2024 14:18

import static java.util.Objects.requireNonNull;

public class OAuth2GatewayCookieProvider
Copy link
Member

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?

Copy link
Contributor Author

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?

@willmostly willmostly force-pushed the will/inject-cookie-configuration branch from cb97cee to 69054ca Compare November 1, 2024 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants