| Lines 29-38
          Koha::Auth::TwoFactorAuth- Koha class deal with Two factor authentication
      
      
        Link Here | 
        
          | 29 | use Koha::Auth::TwoFactorAuth; | 29 | use Koha::Auth::TwoFactorAuth; | 
        
          | 30 |  | 30 |  | 
        
          | 31 | my $secret = Koha::AuthUtils::generate_salt( 'weak', 16 ); | 31 | my $secret = Koha::AuthUtils::generate_salt( 'weak', 16 ); | 
          
            
              | 32 | my $auth = Koha::Auth::TwoFactorAuth->new( | 32 | my $auth = Koha::Auth::TwoFactorAuth->new({ patron => $patron, secret => $secret }); | 
            
              | 33 |     { patron => $patron, secret => $secret } ); | 33 | my $ok = $auth->verify( $pin_code, 1 ); | 
            
              | 34 | my $secret32 = $auth->generate_secret32; |  |  | 
            
              | 35 | my $ok = $auth->verify($pin_code, 1, $secret32); | 
        
          | 36 |  | 34 |  | 
        
          | 37 | It's based on Auth::GoogleAuth | 35 | It's based on Auth::GoogleAuth | 
        
          | 38 |  | 36 |  |