Auth::YubiKey::Client::Web - Authenticate using the Yubico Web API
version 0.0.2
use Auth::YubiKey::Client::Web; my $yubiauth = Auth::YubiKey::Client::Web->new( id => $id, api_key => $apikey, ); my $result = $yubiauth->verify_otp($input); if ($result->is_success) { say 'Good to go'; say 'user-id: ' . $result->public_id; } else { say 'Oh dear: ' . $result->status; }
This function returns a nonce for use in the validation step,
my $nonce = nonce();
Given an OTP make a call to the remote service and validate the value provided.
This method returns an Auth::YubiKey::Client::Web::Response object which can be queried for the validity of the request.
my $response = $self->verify_otp( $otp ); if ($response->is_success) { # yay! } else { # boo! }
To use this module you will require an API key from Yubico. You can get a key by visiting the following page and entering the required information:
Here are some related, useful or interesting links:
Chisel <chisel@chizography.net>
This software is copyright (c) 2013 by Chisel Wright.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Auth::YubiKey::Client::Web, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Auth::YubiKey::Client::Web
CPAN shell
perl -MCPAN -e shell install Auth::YubiKey::Client::Web
For more information on module installation, please visit the detailed CPAN module installation guide.