Skip to content
Advertisement

Tag: spring-security

Spring Security – How to mix xml and Java SecurityFilterChain declaration configurations?

Working on an application that was using XML Schema-based Spring configuration only, I’m slowly introducing Java based configuration. Unfortunately I’m not able to use Spring Security html xml element and Java based SecurityFilterChain configuration at the same time. When I inspect the filterChains list in the FilterChainProxy, it only contains the filter chains from the xml configuration. Despite the Java

Why my test passes without a bearer token

I have a simple Spring app. But I don’t understand why the test passes without the need of a bearer token. Here is the controller: Security Configuration: In order to setup the security configs for tests I’m using: So my test class looks like this: If I change the autority in the test to something like ‘foo-user’ the response becomes

Access Denied – Unable to authenticate login – spring security

I work on simple authentication app using spring security & encounter by an access denied error. I must mention that registration works perfectly & I’ve already created 1 record with bcrypted password but on login I’m failed to understand that what did I miss. Grateful for the help User.java SecurityConfig UserSecurityService (loaduser) } AuthController Error Answer Your logs say this:

Advertisement