Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.
/ YubiAuth Public archive

[ABANDONED] Yubico client - easy and portable PHP class for authenticating with YubiKeys

License

Notifications You must be signed in to change notification settings

Vilican/YubiAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

YubiAuth

Easy and portable PHP class for authenticating with YubiKeys

Created by: Matyáš Koc (Vilican)

Licensed under: CC-BY-NC-SA (if you need to use this in your commercial project, contact me)

How to use

  1. Include or require the file to your PHP project

    require "YubiAuth.php";

  2. Create a new object from this class

    $yubi = new YubiAuth($api_id, $api_key, $server);

    You can get API ID and API key at https://upgrade.yubico.com/getapikey/

    The $server variable is not required. If you don't supply it, Yubico server will be used.

  3. When validating OTP, use the validate method

    $result = $yubi->validate($otp, $user_key_id);

    The $user_key_id is the ID of user's key, which you probably have in database.

  4. Check the result

    if ($result === TRUE) { }

    True is returned if everything is OK. False is returned when there is an error.

About

[ABANDONED] Yubico client - easy and portable PHP class for authenticating with YubiKeys

Topics

Resources

License

Stars

Watchers

Forks

Languages