Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 12:15 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Mon Jan 24, 2011 9:14 pm 
Offline

Joined: Fri May 30, 2008 5:32 am
Posts: 19
Location: Austin, TX USA
laptoproadie wrote:
I tried renaming the file as suggested. As you might expect it broke some other things that said needed PEAR but were unable to find it.


Yeah I thought that may happen but it was worth a shot.

I am almost done porting the Yubikey plugin/component to Joomla! 1.6 so when I release that you can see if running this in Joomla! 1.6 fixes your issues with your web server. I think Joomla! 1.6 gets rid of the PEAR files that are in Joomla! 1.5 so that may work better for you in terms of the conflicts you are seeing.


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Sun Jan 30, 2011 3:15 am 
Offline

Joined: Fri May 30, 2008 5:32 am
Posts: 19
Location: Austin, TX USA
The Joomla! 1.6 version of the plugin/component is ready. You can get them from the project homepage at: http://code.google.com/p/joomla-yubikey-authentication/

If you encounter problems, please post them in this thread as this is the only thread that I receive notifications of new posts.


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 05, 2011 1:47 pm 
Offline

Joined: Tue Dec 14, 2010 10:31 pm
Posts: 4
Hi James ,

thanks for help.

Turned up error logging and issue was in Yubico.php file - Line 344

error - Use of undefined constant CURL_OK - 388
Code:

Broken
       while ($info = curl_multi_info_read($mh)) {
         if ($info['result'] == CURL_OK) {
        
Correct
                while ($info = curl_multi_info_read($mh)) {
         if ($info['result'] == CURLE_OK) {

That piece was fixed , then gave me an error about undefined parameter at line 288.

I couldnt find issue so literally replaced the supplied Yubico.php with one from :

http://php-yubico.googlecode.com/svn/trunk/Yubico.php

So now I dont get errors.... But I dont get logged on either.. says incorrect password....

Any ideas? Thanks again!


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 05, 2011 2:27 pm 
Offline

Joined: Tue Dec 14, 2010 10:31 pm
Posts: 4
sgriffin wrote:
Hi James ,

thanks for help.

Turned up error logging and issue was in Yubico.php file - Line 344

error - Use of undefined constant CURL_OK - 388
Code:

Broken
       while ($info = curl_multi_info_read($mh)) {
         if ($info['result'] == CURL_OK) {
        
Correct
                while ($info = curl_multi_info_read($mh)) {
         if ($info['result'] == CURLE_OK) {

That piece was fixed , then gave me an error about undefined parameter at line 288.

I couldnt find issue so literally replaced the supplied Yubico.php with one from :

http://php-yubico.googlecode.com/svn/trunk/Yubico.php

So now I dont get errors.... But I dont get logged on either.. says incorrect password....

Any ideas? Thanks again!



I got it working.. I setup a test file ...

Code:
<?

require_once 'Yubico.php';
  $otp = "DUMMYDUMMYgbvniifenbhbukckflhbjb";
 
  # Generate a new id+key from https://api.yubico.com/get-api-key/
  $yubi = new Auth_Yubico('1234', '22103218039821038201830281=');
  $auth = $yubi->verify($otp);
  if (PEAR::isError($auth)) {
     echo "<p>Authentication failed: " . $auth->getMessage();
     echo "<p>Debug output from server: " . $yubi->getLastResponse();
  } else {
     echo "<p>You are authenticated!";
    }
?>


And this worked....

So i dug into code..

In Yubikey.php replace:

Code:
$token = new Auth_Yubico($apiID, $signatureKey,1,1);

with

Code:
$token = new Auth_Yubico($apiID, $signatureKey);


Worked for me in my case.. not sure about for others...

Am in!!


Top
 Profile  
Reply with quote  
PostPosted: Sat Feb 05, 2011 8:12 pm 
Offline

Joined: Fri May 30, 2008 5:32 am
Posts: 19
Location: Austin, TX USA
sgriffin wrote:
...

So i dug into code..

In Yubikey.php replace:

Code:
$token = new Auth_Yubico($apiID, $signatureKey,1,1);

with

Code:
$token = new Auth_Yubico($apiID, $signatureKey);


Worked for me in my case.. not sure about for others...

Am in!!


That Yubico.php file is a copy of the official Yubico PHP class that I include with my plug-in package which you figured out. Looks like Yubico updated the class a couple of days ago so I'll need to look into updating my installer package for the plug-in.

For one of the past revisions of the plug-in I switched from using a Yubico.php file that was CURL-independent written by a developer in these forums to the official Yubico PHP class which needs CURL installed on the web server. The official PHP class had support for some new more secure ways of connecting to the Yubico authentication server so that is why I made the switch. That line of code in my Yubikey.php file that you were having problems with has those new features enabled with the "1,1" variables you see in the function call. Here is the snippet of code from the Yubico.php class file for this:
Code:
   /**
    * Constructor
    *
    * Sets up the object
    * @param    string  $id     The client identity
    * @param    string  $key    The client MAC key (optional)
    * @param    boolean $https  Flag whether to use https (optional)
    * @param    boolean $httpsverify  Flag whether to use verify HTTPS
    *                                 server certificates (optional,
    *                                 default true)
    * @access public
    */
   function Auth_Yubico($id, $key = '', $https = 0, $httpsverify = 1)


So in my code I am hard-coding the "https" and "httpsverify" features to an enabled state. When you don't specify those variables in the function call the Yubico class uses the default settings for those variables which is to not use the "https" feature but do use the "httpsverify" feature. So it sounds like there is something about your web server configuration that doesn't work with the "https" feature enabled.

Thanks for posting your solution to the forum. I suspect someone else will probably run into this problem and changing the Auth_Yubico function call in my Yubikey.php file to how you have it will probably fix the issue. I'll add an option to enable or disable the "https" and "httpsverify" settings in the plug-in settings screen in the next update to my authentication plug-in.


Top
 Profile  
Reply with quote  
PostPosted: Fri Mar 25, 2011 5:16 pm 
Offline

Joined: Fri Mar 25, 2011 5:06 pm
Posts: 1
I had to replace Yubico.php in /plugins/authentication with the latest one from the Google Code page to get this to work. Took me a bit of searching on this forum to figure it out. I didn't end up needing to modify any code, just an FYI for others out there having issues, try just replacing the Yubico.php. Otherwise, thanks, great work!


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 20, 2011 8:27 pm 
Offline

Joined: Wed Apr 20, 2011 8:13 pm
Posts: 3
Hi there!

I installed the plugin and component etc., updated the yubikey.php in the appropriate folder but still cannot login. These are the error messages:

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/virtual/masterflex-intranet.de/htdocs/plugins/authentication/yubikey.php on line 14

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/virtual/masterflex-intranet.de/htdocs/plugins/authentication/yubikey.php on line 14

Even the standard-login without using the yubikey is not possible.

I am working with joomla 1.5.22.

Thanks for any help, but I not into programming issues....

Danyel


Top
 Profile  
Reply with quote  
PostPosted: Wed Apr 20, 2011 10:43 pm 
Offline

Joined: Fri May 30, 2008 5:32 am
Posts: 19
Location: Austin, TX USA
Danyel wrote:
Hi there!

I installed the plugin and component etc., updated the yubikey.php in the appropriate folder but still cannot login. These are the error messages:

Warning: require_once(PEAR.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/virtual/masterflex-intranet.de/htdocs/plugins/authentication/yubikey.php on line 14

Fatal error: require_once() [function.require]: Failed opening required 'PEAR.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/virtual/masterflex-intranet.de/htdocs/plugins/authentication/yubikey.php on line 14

Even the standard-login without using the yubikey is not possible.

I am working with joomla 1.5.22.

Thanks for any help, but I not into programming issues....

Danyel


Hmm it seems like there may be something wrong with PEAR on your web server. PEAR is a common library of pre-made functions that web programs can use to supplement their own programming. First we should check to make sure PEAR is installed and accessible to your web site. Try making a web page with only the following text in it:
Code:
<?php
require_once 'System.php';
var_dump(class_exists('System', false));
?>

This is just a small PHP web page that will try to load a PEAR file which is included in all versions of PEAR. Save the web page with the file name "peartest.php" without the quotes and upload it to your web server. Then try to load that web page in your web browser. If you uploaded the file to the top level of your website directory the URL will be something like http://www.yourWebSiteAddress.com/peartest.php . If PEAR is installed correctly you should just see a web page with "bool(true)" displayed and nothing else.


Top
 Profile  
Reply with quote  
PostPosted: Thu Apr 21, 2011 1:37 pm 
Offline

Joined: Wed Apr 20, 2011 8:13 pm
Posts: 3
OK, I think I will check this with my hoster as I do not have my own server running.
Will come back to you as I have any news.

Best regards,
Danyel


Top
 Profile  
Reply with quote  
PostPosted: Wed May 18, 2011 10:28 am 
Offline

Joined: Wed Apr 20, 2011 8:13 pm
Posts: 3
Sorry for my very late reply. Had other projects...

OK, my hoster needed to deactivate the safe mode. I installed this on another webspace, where I also get the error message I originally posted.

Now I am getting a different error message:
Fatal error: Call to undefined method stdClass::onAuthenticate() in /var/www/virtual/assistenzwerk.de/htdocs/libraries/joomla/user/authentication.php on line 121

Question: in the plugin settings I see "000" in the API Key. Does that mean, I have to put "000" in front of my API Key or replace this?

Thanks,
Danyel


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group