Download the PHP package wccplatform/otphp without Composer

On this page you can find all versions of the php package wccplatform/otphp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package otphp

TOTP / HOTP library in PHP

Help me out for a couple of :beers:!

Beerpay Beerpay


Scrutinizer Code Quality Coverage Status

Build Status PHP 7 ready

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

A php library for generating one-time passwords according to RFC 4226 (HOTP Algorithm) and RFC 6238 (TOTP Algorithm)

This library is compatible with Google Authenticator apps available for Android and iPhone. It is also compatible with other applications such as FreeOTP for example.

The Release Process

The release process is described here.

Prerequisites

This library needs at least PHP 7.1. It has been successfully tested using PHP 7.1 and nightly branch.

For older PHP versions support, please use release 8.3.x of this library.

Installation

The preferred way to install this library is to rely on Composer:

By default, documentation and test environment are excluded. If you want to test the library or get the documentation, please add --prefer-source option:

TOTP or HOTP?

This library supports both TOTP and HOTP.

TOTP is a time based one-time password. It lives only for a few seconds (the period). You just have to be sure that the clock of your server and your device are synchronized. This is the most common OTP.

HOTP is a counter based one-time password. Every time a password is used, the counter is updated. You have to verify that the server and the device are synchronized.

How to use

To create an OTP object, just use the static create method. Your object will be able to generate passwords:

In the example above, we use the TOTP class, but you can use the HOTP one the same way.

Then, you have to configure you applications. You can use the provisioning Uri ($otp->getProvisioningUri();) as QR Code input to easily configure all of them.

We recommend you to use your own QR Code generator (e.g. BaconQrCode). If you do not have your own generator, the classes provide a convenient way to get an Uri to the Google Chart API which will generate it for you:

Now that your applications are configured, you can verify the generated OTPs:

Advanced Features

Upgrade

Base 32 Encoder

Please note that the internal Base32 encoder changed on versions 8.3.2 and 9.0.2.

Before

After

Contributing

Requests for new features, bug fixed and all other ideas to make this project useful are welcome.

Please report all issues in the repository bug tracker.

Also make sure to follow these best practices.

Security Issues

If you discover a security vulnerability within the project, please don't use the bug tracker and don't publish it publicly. Instead, please contact me at https://gitter.im/Spomky/

Licence

This software is release under the MIT licence.


All versions of otphp with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
paragonie/constant_time_encoding Version ^2.0
beberlei/assert Version ^2.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wccplatform/otphp contains the following files

Loading the files please wait ....