Download the PHP package jocic/google-authenticator without Composer
On this page you can find all versions of the php package jocic/google-authenticator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package google-authenticator
Google Authenticator
Google Authenticator is a mini PHP library for implementing Multi-Factor Authentication by utilizing Google's Authenticator App. It was written to simplify the usually complicated implementation process.
Following specifications were referenced:
- RFC 4226 - HMAC-Based One-Time Password Algorithm
- RFC 6238 - TOTP: Time-Based One-Time Password Algorithm
- RFC 6287 - OCRA: OATH Challenge-Response Algorithm
Song of the project: Iron Maiden - The Trooper
Versioning Scheme
I use a 3-digit Semantic Versioning identifier, for example 1.0.2. These digits have the following meaning:
- The first digit (1) specifies the MAJOR version number.
- The second digit (0) specifies the MINOR version number.
- The third digit (2) specifies the PATCH version number.
Complete documentation can be found by following the link above.
Examples
Following examples should be more then enough to get you started. I tried my best to make them as simple as possible so that everyone, even junior developers, can successfully use them for implementing two-factor authentication.
- Creating a Secret
- Secret Creation Methods
- Setting Existing Secrets
- Creating an Account
- Account Management
- QR Codes
- Code Validation
For additional examples please review the official project's wiki.
Requirements
You only need to have PHP >=7.0 available on your system to use Google Authenticator in your application. However, for running unit tests, you need to have the following extensions installed:
Installation
There's two ways you can add Google Authenticator library to your project:
- Copying files from the "source" directory to your project and requiring the "Autoload.php" script (this includes doing the same for project's dependencies ex. Encoders)
- Via Composer, by executing the command below
Tests
Following unit tests are available:
- Essentials - Tests for library's essentials ex. Autoloader, Base 32 encoder, etc.
- QR Generators - Tests for available QR code generators in the library.
- Elements - Tests for library's core elements ex. Secret, Account, etc.
You can execute them easily from the terminal like in the example below.
Please don’t forget to install necessary dependencies before attempting to do the God's work above. They may be important.
Contribution
Please review the following documents if you are planning to contribute to the project:
- Contributor Covenant Code of Conduct
- Contribution Guidelines
- Pull Request Template
- MIT License
Integration
My hourly rate is fairly reasonable so, if you need help with integrating Google Authenticator to your existing project, feel free to contact me via the email below.
Integration inquiries: [email protected]
Support
Please don't hesitate to contact me if you have any questions, ideas, or concerns.
My Twitter account is: @jocic_91
My support E-Mail address is: [email protected]
Copyright & License
Copyright (C) 2018 Đorđe Jocić
Licensed under the MIT license.