[keycloak-user] Usiing Annotations to secure method

Fabio Ebner fabio.ebner at lumera.com.br
Mon Oct 15 16:05:55 EDT 2018


It's possible to use the annotation:

@Secured()

in my method to secure instead:

@Override
protected void configure(final HttpSecurity http) throws Exception {
    super.configure(http);
    http
            .authorizeRequests()
            .antMatchers("/estado/*").hasRole("CARTORIO")
            .antMatchers("/natureza/*").hasRole("CLIENTE")
            .anyRequest().permitAll();
}


tks


More information about the keycloak-user mailing list