plugins/yubikey/auth.php
changeset 25 2e7ccbdfdc0a
parent 17 e04c0f64e972
child 32 b00055a88867
equal deleted inserted replaced
22:9b8688df52d5 25:2e7ccbdfdc0a
    24   
    24   
    25   // Sort of a hack: if the password looks like an OTP and the OTP field is empty, use the password as the OTP
    25   // Sort of a hack: if the password looks like an OTP and the OTP field is empty, use the password as the OTP
    26   if ( empty($userdata['yubikey_otp']) && preg_match('/^[cbdefghijklnrtuv]{44}$/', $userdata['password'] ) )
    26   if ( empty($userdata['yubikey_otp']) && preg_match('/^[cbdefghijklnrtuv]{44}$/', $userdata['password'] ) )
    27   {
    27   {
    28     $userdata['yubikey_otp'] = $userdata['password'];
    28     $userdata['yubikey_otp'] = $userdata['password'];
       
    29   }
       
    30   
       
    31   // Look for a lockout
       
    32   $lockout_info = $session->get_lockout_info($lockdata);
       
    33   if ( $lockout_info['locked_out'] )
       
    34   {
       
    35     // pass on to normal auth so the lockout can be sent back properly
       
    36     return null;
    29   }
    37   }
    30   
    38   
    31   if ( !empty($userdata['username']) )
    39   if ( !empty($userdata['username']) )
    32   {
    40   {
    33     // get flags
    41     // get flags