Closed longthanhtran closed 6 years ago
I am trying to get SwitchUserFilter with SAML but stuck with java.lang.IllegalArgumentException: null source when SwitchUserFilter calls SecurityContextHolder.getContext().getAuthentication()
java.lang.IllegalArgumentException: null source
// publish event if (this.eventPublisher != null) { this.eventPublisher.publishEvent(new AuthenticationSwitchUserEvent( SecurityContextHolder.getContext().getAuthentication(), targetUser)); }
so I think I don't know how to prepare or use SecurityContextHolder with SAML. Can you please guide me to do that @ulisesbocchio ? Thanks
I figure it out by myself, I miss use WebSecurity to ignore the path which leads to no context.
Great!
I am trying to get SwitchUserFilter with SAML but stuck with
java.lang.IllegalArgumentException: null source
when SwitchUserFilter calls SecurityContextHolder.getContext().getAuthentication()so I think I don't know how to prepare or use SecurityContextHolder with SAML. Can you please guide me to do that @ulisesbocchio ? Thanks