Authen::OATH::KeyURI - Key URI generator for mobile multi factor authenticator app
use Authen::OATH::KeyURI; # constructor my $keyURI = Authen::OATH::KeyURI->new( ## required params accountname => q{alice@gmail.com}, secret => q{example secret}, # raw secret issuer => q{Example}, ## optional params # scheme => q{otpauth}, # type => q{totp}, # algorithm => q{SHA1}, # digits => 6, # counter => 1, # period => 30, ); # output # format : otpauth://TYPE/LABEL?PARAMETERS print $keyURI->as_string(); # otpauth://totp/Example:alice@google.com?secret=mv4gc3lqnrssa43fmnzgk5a&issuer=Example # constructor with encoded secret my $keyURI = Authen::OATH::KeyURI->new( ## required params accountname => q{alice@gmail.com}, secret => q{mv4gc3lqnrssa43fmnzgk5a}, # base32 encoded secret issuer => q{Example}, is_encoded => 1, ); # output # format : otpauth://TYPE/LABEL?PARAMETERS print $keyURI->as_string(); # otpauth://totp/Example:alice@google.com?secret=mv4gc3lqnrssa43fmnzgk5a&issuer=Example
Authen::OATH::KeyURI generates a setting URL for software OTP authenticator.
Please refer to a document of Google for the details of parameter.
https://code.google.com/p/google-authenticator/wiki/KeyUriFormat
Copyright (C) ritou.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
ritou <ritou.06@gmail.com>
To install Authen::OATH::KeyURI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Authen::OATH::KeyURI
CPAN shell
perl -MCPAN -e shell install Authen::OATH::KeyURI
For more information on module installation, please visit the detailed CPAN module installation guide.