Class LoginHeadersCustomizer
java.lang.Object
com.irurueta.authserver.authorization.api.web.login.LoginHeadersCustomizer
- All Implemented Interfaces:
LoginChainCustomizer
@Component
@Order(0)
public class LoginHeadersCustomizer
extends Object
implements LoginChainCustomizer
Adds the security headers of the server-rendered pages: the content security policy that
LoginContentSecurityPolicy builds (same-origin resources only, no framing, and the origin of an absolute
branding logo URL for images), X-Content-Type-Options and Referrer-Policy.
The policy deliberately has no form-action directive: browsers also apply it to the redirects that follow
a form submission, so form-action 'self' would block the redirect from the login or consent form back to the
client application's redirect_uri, which is on another origin.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LoginContentSecurityPolicyBuilds the content security policy from the branding. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcustomize(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Customizes the login/UI chain.
-
Field Details
-
contentSecurityPolicy
Builds the content security policy from the branding.
-
-
Constructor Details
-
LoginHeadersCustomizer
public LoginHeadersCustomizer()
-
-
Method Details
-
customize
public void customize(org.springframework.security.config.annotation.web.builders.HttpSecurity http) Description copied from interface:LoginChainCustomizerCustomizes the login/UI chain.- Specified by:
customizein interfaceLoginChainCustomizer- Parameters:
http- security builder of the chain.
-