• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sso redirect

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,



Thanks

-regards
-ravindra
[originally posted on jforum.net by ravindra]
 
You didn't tell me he was so big. Unlike this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic