-
Notifications
You must be signed in to change notification settings - Fork 6.1k
DSL nested builder for HTTP security #7046
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
DSL nested builder for HTTP security #7046
Conversation
2f9990e
to
eeabb5c
Compare
eeabb5c
to
8931800
Compare
3eccb45
to
ce98f79
Compare
ce98f79
to
4b2539d
Compare
@@ -1,5 +1,5 @@ | |||
/* |
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.
featurePolicy()
has not been updated to allow lambda configuration.
This is because there is no reasonable default for the policyDirectives
argument.
Instead, it can be the last configuration for headers()
.
http
.headers(headers ->
headers
.defaultsDisabled()
.referrerPolicy(referrerPolicy ->
referrerPolicy.policy(ReferrerPolicy.SAME_ORIGIN)
)
.featurePolicy("")
);
*/ | ||
public OpenIDLoginConfigurer<H> attributeExchange(Customizer<AttributeExchangeConfigurer> attributeExchangeCustomizer) | ||
throws Exception { | ||
AttributeExchangeConfigurer attributeExchangeConfigurer = new AttributeExchangeConfigurer(".*"); |
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.
The default attribute exchange identifier pattern is ".*" to match everything. It can be updated using the new identifierPattern()
method.
* @see AttributeExchangeConfigurer#attribute(String) | ||
*/ | ||
private AttributeConfigurer() { | ||
this.name = "default-attribute"; |
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.
The default attribute name is "default-attribute". This is primarily to avoid a NullPointerException
, users should override the name in the name()
setter.
Issue: gh-5557