eustasy/authenticatron

View on GitHub
index.php

Summary

Maintainability
A
0 mins
Test Coverage

Line exceeds 120 characters; contains 163 characters
Open

            <p><code>$Variance</code> is an optional integer indicating the adjustment of codes with a 30 second value. Defaults to 2 either side, or 1 minute.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 167 characters
Open

            <a href="https://www.codacy.com/public/eustasy/authenticatron"><img src="https://api.codacy.com/project/badge/670334725e9240d1beddb0b34f0d8c3c"></a> &emsp;
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 145 characters
Open

                        echo '<p class="color-pomegranate">Invalid Entry: The code you entered was not 6 characters long, and alphanumeric.</p>';
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 147 characters
Open

            <p class="subtitle">Use <code>Authenticatron_New</code> to create a new secret for a member, and fetch a secure image for scanning.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 200 characters
Open

            <p><code>$Code</code> is the user input, the code that is generated on their device for authentication. Should be numeric-only in most cases, alpha-numeric if you change some settings.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 186 characters
Open

            <p>Try scanning this into an app like <a href="https://m.google.com/authenticator">Google Authenticator</a>. You should see a code and a countdown clock until it changes.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 133 characters
Open

            <p>Outputs a boolean value, <code>true</code> if the entered code is within allowed range, <code>false</code> if not.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 183 characters
Open

            <p>Outputs an array, where <code>Secret</code> is the Secret for the member, <code>URL</code> is an OTPAuth URL, and <code>QR</code> is the Data64 URI for the QR code.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 277 characters
Open

            <p>You'll want to store <code>['Secret']</code> with the member, but make sure you get them to confirm a code before enforcing it, or it might not have worked and they would be locked out of their account. Make sure that this is as protected as a password hash.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 128 characters
Open

        <p>Take a look at the <a href="documentation.php#glossary">glossary</a> if there are any terms you don't understand.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 144 characters
Open

            <p>You only need to check an input is alpha-numeric, and maybe 6 characters long before checking it against a retreieved secret.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 132 characters
Open

                            echo '<p class="color-nephritis">Correct Code: The code you entered was correct, congratulations!</h3>';
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 138 characters
Open

            <p class="subtitle">Use <code>Authenticatron_Check</code> to confirm the setup and check time-unique codes at every login.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 165 characters
Open

                            echo '<p class="color-pomegranate">Incorrect Code: The code you entered was not valid at this time. Codes are valid for 30 seconds.</p>';
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 149 characters
Open

        <p>Visit our <a href="documentation.php">documentation</a> for a more thorough description of the options and functions available to you.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 137 characters
Open

        <p>The <a href="server.php">server</a> page can be used if this script is installed on your server to check for requirements.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 167 characters
Open

            <a href="https://codeclimate.com/github/eustasy/authenticatron"><img src="https://codeclimate.com/github/eustasy/authenticatron/badges/gpa.svg"></a> &emsp;
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 131 characters
Open

            <a href="https://travis-ci.org/eustasy/authenticatron"><img src="https://travis-ci.org/eustasy/authenticatron.svg"></a>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 157 characters
Open

            <p><code>$Member_Name</code> is a string containing your members username or nice-name, perferably something unique and quickly identifiable.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 140 characters
Open

            <p><code>['QR']</code> is the Data64 URI for the QR code. You can simply echo it into an <code>img</code> element like this:</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line exceeds 120 characters; contains 180 characters
Open

        <p>This work is predominantly MIT licensed. See the <a href="https://github.com/eustasy/authenticatron/blob/master/LICENSE.md">LICENSE.md file</a> for more information.</p>
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 16 spaces, found 24
Open

                        } else {
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 16 spaces, found 24
Open

                        if ( Authenticatron_Check($_POST['secondfactor_code'], $Secret) ) {
Severity: Minor
Found in index.php by phpcodesniffer

Usage of ELSE IF is discouraged; use ELSEIF instead
Open

} else if ( !empty($_GET['secret']) ) {
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 12 spaces, found 16
Open

                } else {
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 12 spaces, found 16
Open

                }
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 16 spaces, found 20
Open

                    if (
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 16 spaces, found 24
Open

                        }
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 12 spaces, found 16
Open

                if ( !empty($Secret) ) {
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 16 spaces, found 20
Open

                    } else {
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 12 spaces, found 16
Open

                if ( !empty($_POST['secondfactor_code']) ) {
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 12 spaces, found 16
Open

                }
Severity: Minor
Found in index.php by phpcodesniffer

Line indented incorrectly; expected 16 spaces, found 20
Open

                    }
Severity: Minor
Found in index.php by phpcodesniffer

There are no issues that match your filters.

Category
Status