Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

User switching in Spring Security using CrowdUserDetails

Graham Bakay
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 26, 2023

I have Crowd integrated and working with with Spring Security. I'm looking to implement the "Switch User" functionality provided in Spring Security (via the SwitchUserFilter).

My app throws `java.lang.UnsupportedOperationException: Not giving you the password` when the filter attempts to call `getPassword()` on the UserDetails (CrowdUserDetails) object when trying to create a UsernamePasswordAuthenticationToken. The javadoc says this is to avoid disclosing the password.

Has anyone else been able to get user switching working? Would it be as simple as subclassing the CrowdUserDetails class and returning a nonce password?


0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events