コード例 #1
0
ファイル: manage-devices.php プロジェクト: biladina/logSys
<?php

require "config.php";
\Fr\LS::init();
if (isset($_GET['revoke_device']) && \Fr\LS::csrf()) {
    if (\Fr\LS::revokeDevice($_GET['revoke_device'])) {
        $revoked = true;
    } else {
        $revoked = false;
    }
}
?>
<html>
  <head>
    <title>Log In With Two Step Verification</title>
  </head>
  <body>
    <div class="content">
      <h2>Two Step Log In</h2>
      <p>The list shows the devices currently authorized to login using your account</p>
      <?php 
if (isset($revoked)) {
    if ($revoked) {
        echo "<h2>Successfully Revoked Device</h2>";
    } else {
        echo "<h2>Failed to Revoke Device</h2>";
    }
}
$devices = \Fr\LS::getDevices();
if (count($devices) == 0) {
    echo "<p>No devices are authorized to use your account without 2 Step Verification.</p>";