Exemplo n.º 1
0
 /**
  * Get OTP Session Token.
  *
  * @return string|exception
  */
 protected function getToken()
 {
     if (!$this->request->hasHeader('X-OTP-SESSION-TOKEN')) {
         throw new InvalidTwoFactorSessionToken();
     }
     return $this->request->header('X-OTP-SESSION-TOKEN');
 }
Exemplo n.º 2
0
 /**
  * Determine if a header is set on the request.
  *
  * @param string $key
  * @return bool 
  * @static 
  */
 public static function hasHeader($key)
 {
     return \Illuminate\Http\Request::hasHeader($key);
 }