Learn how to use Spring Boot, Java, and Auth0 to secure a feature-complete API. Learn how to use Auth0 to implement authorization in Spring Boot.
Read more…
Brought for you by Tadej Slamic
Learn how to use Spring Boot, Java, and Auth0 to secure a feature-complete API. Learn how to use Auth0 to implement authorization in Spring Boot.
Read more…
Brought for you by Tadej Slamic
What are you thoughts guys? Share it in the comments!
This topic was automatically closed 27 days after the last reply. New replies are no longer allowed.
I’m having an issue specifically in converter.setAuthorityPrefix("");
, looking into the setAuthorityPrefix method there’s this line Assert.hasText(authorityPrefix, "authorityPrefix cannot be empty");
, so the current code fails. Tried to omit the prefix setting call but didn’t works neither. Trying to enforce the write:courses
permission for certain endpoint. I have logged the access token coming in the request and indeed it comes with the permissions=["write:courses", "read:courses"]
value.
Howdy, Reynier.
Where is that method in the blog post?
The only one I can find that has that assertion is the AudienceValidator
AudienceValidator(String audience) {
Assert.hasText(audience, "audience is null or empty");
this.audience = audience;
}
Hi Dan, it is in the SecurityConfig::jwtAuthenticationConverter()
method, 3rd line. It fails trying to execute converter.setAuthorityPrefix("");
because authorityPrefix can’t be empty.
Hi,
I am getting a read timeout getting remote JWK set at the “Sign In” step (https://auth0.com/blog/spring-boot-authorization-tutorial-secure-an-api-java/#Sign-In)
The only two deviations from the instructions are - 1) I am using Maven instead of gradle and 2) I am using Eclipse I.D.E
I have attached
Any help appreciated
Regards,
Chaitanya Soman
StackTrace.txt (23.7 KB)
After adding the AudienceValidator before registering a client, I run my project and I get the following error:
Error creating bean with name ‘springSecurityFilterChain’ defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method ‘springSecurityFilterChain’ threw exception; nested exception is java.lang.IllegalArgumentException: Unable to resolve the Configuration with the provided Issuer of…
Anyone with the same problem?
Hello! Welcome to the Auth0 Community.
Could y’all please try the code from this code sample and see if you experience the same errors?