Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

logout problem with ldap

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,


I have implemented the SSO and it is working well. but i am facing one problem that when i click on logout it still show showing user is logged in

How can this be performed?

i did many try outs but still problem is not solved

JForumExecutionContext.getRequest().getSessionContext().invalidate(); //in UserAction.java -logout method

auto.login.enabled = false // in SystemGlobals.properties

i change redirect link in logout method but when user click on back it shows same page with user logged in

but this didnt work

SystemGlobals.properties file contains : -

authentication.type = sso
login.authenticator = net.jforum.sso.LDAPAuthenticator
auto.login.enabled = false
sso.implementation = net.jforum.sso.RemoteUserSSO
sso.password.attribute = password
sso.email.attribute = email
sso.default.email = sso@user
sso.default.password = sso
sso.redirect =
ldap.security.protocol =
ldap.authentication = EXTERNAL
ldap.factory = com.sun.jndi.ldap.LdapCtxFactory
ldap.login.prefix = sAMAccountName=
ldap.login.suffix = OU=PLM,OU=TGSPUNE,DC=tgspune,DC=local
ldap.server.url = ldap://intgs-dc-02
ldap.field.email = mail
ldap.lookup.prefix = sAMAccountName=
ldap.lookup.suffix = OU=PLM,OU=TGSPUNE,DC=tgspune,DC=local

header.htm contains follwing htm code
<#if sso && logged>
<a id="logout" style="color:#ffffff;" class="mainmenu" href="${JForumContext.encodeURL("/user/logout")}">    ${I18n.getMessage("ForumBase.logout")} [${session.username}]    </a>
</#if>

UserAction.java contains follwing logout code
public void logout()
{
System.out.println("--------------------------------");
UserSession userSession = SessionFacade.getUserSession();
SessionFacade.storeSessionData(userSession.getSessionId(), JForumExecutionContext.getConnection());
SessionFacade.makeUnlogged();
SessionFacade.remove(userSession.getSessionId());
userSession.setAutoLogin(false);
// JForumExecutionContext.getRequest().getSessionContext().invalidate();
// Disable auto login
//System.out.println("SessionFacade length : - "+SessionFacade.getAllSessions().size());
userSession.makeAnonymous();
SessionFacade.add(userSession);
JForumExecutionContext.setRedirect(this.request.getContextPath()
+ "/forums/list"
+ SystemGlobals.getValue(ConfigKeys.SERVLET_EXTENSION));
}


if anybody faces this problem then please reply

Thanks and regards
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic