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

Add ExceptionMapper to security-openid-connect-client-quickstart #1108

Merged
merged 1 commit into from
May 10, 2022
Merged

Add ExceptionMapper to security-openid-connect-client-quickstart #1108

merged 1 commit into from
May 10, 2022

Conversation

sberyozkin
Copy link
Member

No description provided.

@sberyozkin sberyozkin requested a review from gsmet May 8, 2022 18:14
@@ -11,6 +11,10 @@ quarkus.oidc-client.grant.type=password
quarkus.oidc-client.grant-options.password.username=alice
quarkus.oidc-client.grant-options.password.password=alice

org.acme.security.openid.connect.client.ProtectedResourceOidcClientFilter/mp-rest/url=http://localhost:8081/protected
org.acme.security.openid.connect.client.ProtectedResourceTokenPropagationFilter/mp-rest/url=http://localhost:8081/protected
%prod.port=8080
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gsmet Guillaume, is it a good way to handle client ports such that it works in dev, test and prod modes ? I've verified, it works, but may be there is a neater way

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to just use ${quarkus.http.port} I think?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ladicek Thanks, I'll give it a try

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ladicek No, it does not work, tests fail as the test endpoints are on 8081 but quarkus.http.port is 8080 by default.
I guess I can set quarkus.http.port to 8081 in pom.xml but I'm not sure if it will be a simpler approach ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I thought quarkus.http.port is 8081 in the test profile. I swear I saw something like this before, but not sure exactly...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Ladicek No problems, thanks for the idea, it makes sense to have it defaulting to 8081, may be it was done indirectly by assigning it to quarkus.http.test-port in some demo configuration

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's not pretty, we probably have to improve on this but it will do for now.

@gsmet gsmet merged commit d484178 into quarkusio:development May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants