Skip navigation
298 Views 2 Replies Latest reply: Feb 9, 2012 11:00 PM by Monmohan RSS
Naga Bronze 1 posts since
Feb 1, 2012
Currently Being Moderated

Feb 1, 2012 4:39 AM

SASLAuthentication - not set authtoken for JIVE-SHAREDSECRET

When user is authenticated using JIVE-SHAREDSECRET mechanism, the authenticationSuccessful method is not passed the username, and so the user is not shown as logged-in.  The doSharedSecretAuthentication method has the following code,

 

StringTokenizer tokens = new StringTokenizer(data, "\0");

tokens.nextToken();

secretDigest = tokens.nextToken();

if (authenticateSharedSecret(secretDigest)) {

    authenticationSuccessful(session, null, null);

    return Status.authenticated;

}

 

which I think should be changed to

 

StringTokenizer tokens = new StringTokenizer(data, "\0");

String username = tokens.nextToken();

secretDigest = tokens.nextToken();

if (authenticateSharedSecret(secretDigest)) {

    authenticationSuccessful(session, username, null);

    return Status.authenticated;

}

 

 

I was not able to see the user as logged-in because of this reason.  When I tried this change, it worked.  Let me know whether anybody faced such issue, and if there is any other mechanism to login the user.

 

thanks,

Naga

More Like This

  • Retrieving data ...

Bookmarked By (1)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points