File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sso redirect

 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a question about the sso.redirect property in SystemGlobals.properties. When is this used? I thought I read somewhere in the documentation that it is called when authentication.type = sso and the user attempts to access a section that they don't have permission to. However, I can only find one place in the code where it is called and that is in PostAction.downloadAttach(). And so in my testing, I could not get it to redirect.

Maybe I'm going about this the wrong way, though. I'd like to integrate it into my existing application, using a cookie with a custom SSO implementation. However, I don't want to allow anonymous users, so if one of my users bookmarks a forum and goes there without first logging into my existing application, I want it to forward to my application's login page. I would think that I'd implement this using the sso.redirect, but I can't get it to forward. All I get is the "you don't have sufficient privileges" message.

Is this a bug or am I using it wrong?
[originally posted on jforum.net by greg_williams]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, it looks like users just get authenticated as Anonymous if your SSO implementation's authenticateUser method returns null. They don't get redirected to the sso.direct value unless they click on PM or something.

It's going to be necessary for my implementation to redirect to a login page instead of just allowing access as Anonymous. I'm going to look into adding that functionality myself.
[originally posted on jforum.net by greg_williams]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, that wasn't very difficult at all. I modified the checkSSO method in ControllerUtils.java, added a boolean option in SystemGlobals.properties called sso.allow.anonymous.

Here's the code snippets. First is ControllerUtils.java:


And I added a value in ConfigKeys.java


And here's the change to SystemGlobals.properties:



[originally posted on jforum.net by greg_williams]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,



Thanks

-regards
-ravindra
[originally posted on jforum.net by ravindra]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic