Auth0 Home Blog Docs

Api authentication



I need to implement spring basic security for web and auth0 for api in single application but both are not working together
Any one Will help me for this


Hello there @ajeetku, we are be happy to help. When you get a moment can you share some more details on what may be going on. You mentioned Spring which we have a quick start doc for here. We also have detailed documentation on utilizing Auth0’s Authentication API here. Thanks!


Hello James I am able to use auth0 and spring basic security one by one but together


My implemention is something like this but it’s not working

protected void configure(HttpSecurity http) throws Exception {
                .forRS256("YOUR_API_AUDIENCE", "YOUR_API_ISSUER")

		.antMatchers("/dba/**").access("hasRole('ROLE_ADMIN') or hasRole('ROLE_DBA')")


I wanted to follow up @ajeetku and see what error exactly you are getting? Whether it be in the logs or the developer console. I want to understand better the hurdle you’re facing so we can work together to resolve it. Thanks in advance.


We are returning x-auth-tocken from spring basic security after authentication but when using auth0 along with basic security it’s not return tocken after authentication in header


When you get a chance @ajeetku can you DM me your tenant name and a HAR file when reproducing the workflow that produces the error. Once you got it please DM it over to me and I’ll be happy to take a deeper look at what may be going on. Thanks in advance!


Thank you for the HAR file, I will take a deeper look at this and see what I am able to find that may help us troubleshoot the issue.