Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
I'm trying solve a problem using CAS with Spring Security, when I do a link to another url that use to the same CAS Server.
I tried change the SimpleURLAuthenticationSuccess by SavedRequestAwareAuthenticationSuccessHandler like in this
link
but still not working.
To show better my scenario is:
I have two applications running in the same CAS Server.
When I access the application 1, then I goes to the CAS Server.
After logIn I access the context of application normally.
The problem occur when I try access application 2 through the following link
<a href="/applicationB/pages/motors/1"/>
I'm redirected to CAS and CAS redirect me to /applicationB, context of application.
According with this link, I simply should change the bean SimpleURLAuthenticationSuccess by SavedRequestAwareAuthenticationSuccessHandler
Edited
I saw that maybe the solution isn't use SavedRequestAwareAuthenticationSuccessHandler, because, the CasAuthenticationFilter extends AbstractAuthenticationProcessingFilter and this class have the following method:
* Sets the strategy used to handle a successful authentication.
* By default a {@link SavedRequestAwareAuthenticationSuccessHandler} is used.
public void setAuthenticationSuccessHandler(AuthenticationSuccessHandler successHandler) {
Assert.notNull(successHandler, "successHandler cannot be null");
this.successHandler = successHandler;
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.