When initializeUserHandler for plugins are called they don't receive the loginName (first arg).
The reason for this is, in the TWiki session object the remoteUser field is not set.
When you create a new TWiki object the remoteUser field used to be set like this:
$remoteUser ||= $query->remote_user() || $TWiki::cfg{DefaultUserLogin};
$this->{remoteUser} = $remoteUser;
But since 4.1.0 it is not being set. I've made a simple fix by changing this line:
my $login = $this->{loginManager}->loadSession($loginName);
into this:
my $login = $this->{remoteUser} = $this->{loginManager}->loadSession($loginName);
--
TWiki:Main.VernonLyon
This is the 2nd issue I hear about related to changes in authentication
The code line that was changed comes from SVN r11571 made by
TWiki:Main.CrawfordCurrie
This is way beyond what I can understand. Crawford?
--
KennethLavrsen - 27 Jan 2007
Do we have an issue here or not? I get the feeling this is non urgent.
--
KennethLavrsen - 02 Feb 2007
I'd like to understand why it is needed, as the only application I can think of is an login manager, which should be done by writing a subclass of Client. Vernon?
CC
Cannot be urgent if the reporter does not want this in 4.1.1.
KJL
This should be an urgent bug. At our company we're using a plugin that autoregisters unknown users which have successfully authenticated via Shibboleth. The autoregister plugin uses initializeUserHandler to create a
WikiName for unknown Login Names and add it to the system. All of this can't work when the
LoginName doesn't get passed to the handler.
--
PascalSchuppli - 17 Feb 2007
I came across the same issue when I did the
NewUserPlugin. I would have liked to use the
inititializeUserHandler
to create a home topic for
users registered and authenticated with different means (e.g.
LdapContrib) and did not get a home topic as a result of the normal TWiki registration process. It would be a lot more efficient to use the
initializeUserHandler
than the way it is done now in the
NewUserPlugin.
Maybe this handler could be fix once and forever, please ...
MD
Not sure why this was left waiting for Vernon. If there are at least two clear applications for the handler, it is evidently required.
Resetting to Urgent, and Confirmed.
CC
Vernon's patch commited to MAIN and Patch
--
SvenDowideit - 19 Feb 2007
Closed with release of 4.1.2
KJL