Auth-GoogleAuthenticator

 view release on metacpan or  search on metacpan

lib/Auth/GoogleAuthenticator.pm  view on Meta::CPAN

use vars qw($VERSION);
$VERSION= '0.03';

sub new {
    my ($class, %args) = @_;
    if( $args{ secret_base32 }) {
        $args{ secret } = decode_base32( delete $args{ secret_base32 });
    };
    
    $args{ auth } ||= Authen::OATH->new();
    bless \%args => $class;
}

sub auth { $_[0]->{auth} };

sub registration_qr_code {
    my ($self, $label, $type) = @_;
    # if we have an OTP, dislay the QRCode to the user
    require Imager::QRCode;
    my $qrcode = Imager::QRCode->new(
        size => 4,

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.154 second using v1.00-cache-1.14-grep-28634ff-cpan-ac32402124b )