https://github.com/cryptiklemur/yubico-php-client
Yubico YubiCloud PHP Client library
https://github.com/cryptiklemur/yubico-php-client
Last synced: 8 months ago
JSON representation
Yubico YubiCloud PHP Client library
- Host: GitHub
- URL: https://github.com/cryptiklemur/yubico-php-client
- Owner: cryptiklemur
- License: bsd-2-clause
- Created: 2014-12-15T21:21:29.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-12-15T21:44:50.000Z (over 11 years ago)
- Last Synced: 2025-03-27T11:21:12.288Z (about 1 year ago)
- Language: PHP
- Size: 95.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Yubico PHP Client
### Installation
Add the `yubico/yubico-php-client` package to your `require` section in your `composer.json`
```js
{
// ...
"require": {
// ...
"yubico/yubico-php-client": "~2.0.0"
}
}
```
### Usage
A Quick Example:
```php
$otp = "ccbbddeertkrctjkkcglfndnlihhnvekchkcctif";
// Generate a new id+key from https://api.yubico.com/get-api-key/
$yubi = new \Yubico\YubiCloud('42', 'FOOBAR=');
try {
$auth = $yubi->verify($otp);
echo "
You are authenticated!";
} catch (\Exception $e) {
echo "
Authentication failed: ".$auth->getMessage();
echo "
Debug output from server: ".$yubi->getLastResponse();
}
```