/** * 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'); }
/** * 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); }