July 2018
Intermediate to advanced
268 pages
7h 36m
English
Spring Security allows you to write your own Domain Specific Language (DSL), which can be used to configure security in your application. We have already seen a custom DSL in action when we implemented SAML authentication using OKTA. We used an OKTA-provided custom DSL to configure Spring Security.
To write your own custom DSL, you can extend the AbstractHttpConfigurer class and override a few of it's methods, as shown here:
public class CustomDSL extends AbstractHttpConfigurer<CustomDSL, HttpSecurity> { @Override public void init(HttpSecurity builder) throws Exception { // Any configurations that you would like to do (say as default) can be configured here } @Override public void configure(HttpSecurity builder) throws Exception ...Read now
Unlock full access