Skip to content

Conversation

Matthbo
Copy link
Member

@Matthbo Matthbo commented May 12, 2025

No description provided.

@Matthbo Matthbo marked this pull request as ready for review May 13, 2025 15:47
@Matthbo Matthbo requested a review from a team as a code owner May 13, 2025 15:47
if (attributes == null)
return false;

if (!attributes.containsKey("name") || !attributes.containsKey("value") || !attributes.containsKey("defaultValue"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Will you always need to set defaultValue on the annotation?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1

Copy link
Member

Choose a reason for hiding this comment

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

You could also argument that if no value is found it resolves to false, and if you wish to check if its empty you must provide @ConditionalOnAppConstants(name="something", value="")

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a default to defaultValue in the annotation and remove the need for defaultValue to be set in the attributes map

@Matthbo Matthbo force-pushed the issue/8801-oauth2openid-configured-on-apilistenerservlet-causes-403-error-on-unauthenticated-console-after-login-on-apilistenerservlet branch from c5e88a2 to 6785efd Compare May 15, 2025 09:13
@Matthbo Matthbo requested a review from tnleeuw May 15, 2025 09:13
if (attributes == null)
return false;

if (!attributes.containsKey("name") || !attributes.containsKey("value") || !attributes.containsKey("defaultValue"))
Copy link
Member

Choose a reason for hiding this comment

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

You could also argument that if no value is found it resolves to false, and if you wish to check if its empty you must provide @ConditionalOnAppConstants(name="something", value="")

Matthbo and others added 2 commits May 15, 2025 14:59
Co-authored-by: Niels Meijer <nielsmeijer@hotmail.com>
This is not needed anymore because even if its not directly stated in the AppConstants, the context environment will have the value filled in if the property is set internally
@Matthbo Matthbo requested a review from nielsm5 May 15, 2025 14:22
Copy link

@Matthbo Matthbo merged commit ed07f82 into master May 15, 2025
32 checks passed
@Matthbo Matthbo deleted the issue/8801-oauth2openid-configured-on-apilistenerservlet-causes-403-error-on-unauthenticated-console-after-login-on-apilistenerservlet branch May 15, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Oauth2+Openid configured on 'ApiListenerServlet' causes 403 error on unauthenticated console after login on 'ApiListenerServlet'
4 participants