Auth0 Home Blog Docs

Auth0 authentication and Spring Security, authorization using local database

Hi All,
I am able to secure my application using auth0 perfectly, but I want to extend my authorization using local database in Spring Rest application.

Below configuration works fine for authentication.
JwtWebSecurityConfigurer
.forRS256(apiAudience, issuer)
.configure(http)
.authorizeRequests()
.antMatchers(AUTH_WHITELIST).permitAll()
.antMatchers(HttpMethod.GET, “/").authenticated()
.antMatchers(HttpMethod.POST, "/
”).authenticated();

I have tried using Spring Security UserDetailsService.loadUserByUsername() but unable to authorize any roles.

Please help me to point out where I am going wrong.

Thanks in advance
Vamsi