From 040895e677e1e45b6b1dccc6d7d8831c9b931fcf Mon Sep 17 00:00:00 2001 From: Juan Carlos Luciani Date: Wed, 31 May 2006 21:01:18 +0000 Subject: [PATCH] Fixed a problem where the identityId was not getting set correctly in the SessionTokens when a startSearchContext was not being configured. --- .../src/com/novell/casa/authtoksvc/Authenticate.java | 2 +- .../src/com/novell/casa/authtoksvc/Krb5Authenticate.java | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Authenticate.java b/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Authenticate.java index d2244fba..fb4a24da 100644 --- a/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Authenticate.java +++ b/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Authenticate.java @@ -276,7 +276,7 @@ public class Authenticate implements RpcMethod // Create response based on the identity resolution results if (identId != null && identId.length() != 0) { - System.err.println("Authenticate.invoke()- identId resolved"); + System.err.println("Authenticate.invoke()- identId resolved, " + identId); // An identity was resolved, get a SessionToken for it. SessionToken sessionToken = new SessionToken(identId, diff --git a/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Krb5Authenticate.java b/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Krb5Authenticate.java index 5b02178e..2d20aef6 100644 --- a/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Krb5Authenticate.java +++ b/auth_token/server/AuthTokenSvc/src/com/novell/casa/authtoksvc/Krb5Authenticate.java @@ -223,7 +223,14 @@ public class Krb5Authenticate implements AuthMechanism, Serializable { // The search succeeded, set the identity id. SearchResult sr = (SearchResult)answer.next(); - identId = sr.getName() + "," + m_svcConfig.getSetting(SvcConfig.StartSearchContext); + if (searchContext.equals("")) + { + identId = sr.getName(); + } + else + { + identId = sr.getName() + "," + searchContext; + } } } catch (NamingException e)