The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Auth::Yubikey_WebClient - Authenticating the Yubikey against the Yubico Web API

VERSION

Version 1.01

SYNOPSIS

Authenticate against the Yubico server via the Web API in Perl

Sample CGI script :-

        #!/usr/bin/perl

        use CGI;
        $cgi = new CGI;
        $otp = $cgi->param("otp");

        print "Content-type: text/html\n\n";
        print "<html>\n";
        print "<form method=get>Yubikey : <input type=text name=otp size=40 type=password></form>\n";

        use Auth::Yubikey_WebClient;

        $id = "<enter your id here>";
        $api = "<enter your API key here>";

        if($otp)
        {
                $result = Auth::Yubikey_WebClient::yubikey_webclient($otp,$id,$api);
                # result can be either ERR or OK

                print "Authentication result : <b>$result</b><br>";
        }

        print "</html>\n";

FUNCTIONS

yubikey_webclient

USAGE

Before you can use this module, you need to register for an API key at Yubico. This is as simple as logging onto <https://api.yubico.com/yms/getapi.php> and entering your Yubikey's OTP and a brief description. Once you have the API and ID, you need to provide those details to the module to work.

AUTHOR

Phil Massyn, <phil at massyn.net>

BUGS

Please report any bugs or feature requests to bug-auth-yubikey_webclient at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Auth-Yubikey_WebClient. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Auth::Yubikey_WebClient

You can also look for information at:

Version history

0.04 - Fixed bug http://rt.cpan.org/Public/Bug/Display.html?id=51121 1.00 - Added validation of the request to Yubico (Thanks to Kirill Miazine)

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2010 Phil Massyn, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.