Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1
  • 2

TOPIC:

multiple authentication methods 10 years 8 months ago #1340

  • bogaerbr
  • bogaerbr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
Is there a way to ask Xerte to authenticate using e.g. Static if the user could not be authenticated using LDAP?
I can authenticate students and staff with LDAP, but no guests staff at the university.
And since I can not add entries at the LDAP directory, I wish I could ask Xerte to authenticate using a second method if the first one failed.

Please Log in or Create an account to join the conversation.

multiple authentication methods 10 years 8 months ago #1367

  • julten
  • julten's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 137
  • Thank you received: 18
Yes, you can do this. In auth_config.php change the first bit of coe to look like this:

if ($static == true){
$xerte_toolkits_site->authentication_method = 'Static';
}else{
//$xerte_toolkits_site->authentication_method = 'Guest';
$xerte_toolkits_site->authentication_method = 'Ldap';
//$xerte_toolkits_site->authentication_method = 'Db';
//$xerte_toolkits_site->authentication_method = 'Static';
//$xerte_toolkits_site->authentication_method = "Moodle";
}

Then in library/Xerte/Authentication/Static.php, create a username ./ password in this bit:

/** Edit this list to your hearts content ... */
private $_users = array(

'osls_admin' => array("username" => "USERNAME", "password" => "PASSWORD", "firstname" => "OSLS", "surname" => "Admin"),

);

And then those uses can log in via management.php. We do it here. I think that's all you need to do. THe only slight drawback is having to get those users to login via management.php, rather than the normal /xertetoolkits index page.
The following user(s) said Thank You: bogaerbr

Please Log in or Create an account to join the conversation.

multiple authentication methods 10 years 8 months ago #1368

  • bogaerbr
  • bogaerbr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
I tried your solution,

if ($static==true){
$xerte_toolkits_site->authentication_method = 'Static';
}else{
//$xerte_toolkits_site->authentication_method = 'Guest';
$xerte_toolkits_site->authentication_method = 'Ldap';
//$xerte_toolkits_site->authentication_method = 'Db';
//$xerte_toolkits_site->authentication_method = 'Static';
//$xerte_toolkits_site->authentication_method = "Moodle";
}

and added a 'static' user to the Static.php file as suggested,
But I could not log in as 'static' user through the management.php page.
Not even through the 'normal' login page.

Thanks for the suggestion,

Bruno Van Bogaert

Please Log in or Create an account to join the conversation.

multiple authentication methods 10 years 8 months ago #1369

  • julten
  • julten's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 137
  • Thank you received: 18
I've jsut dug up the old mail when this was discussed: try logging in at static.php.

Please Log in or Create an account to join the conversation.

multiple authentication methods 10 years 8 months ago #1370

  • bogaerbr
  • bogaerbr's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 17
  • Thank you received: 0
But there is no
static.php
under the root of xerte
??

Please Log in or Create an account to join the conversation.

multiple authentication methods 10 years 8 months ago #1371

  • julten
  • julten's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 137
  • Thank you received: 18
You need to move it to the root folder

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ronmjultenJohnSmith
Time to create page: 0.050 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search