Download the PHP package abmmhasan/otp without Composer

On this page you can find all versions of the php package abmmhasan/otp. 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 otp

OTP

Security & Standards Codacy Badge Packagist Downloads (custom server) License: MIT Packagist Version Packagist PHP Version GitHub code size in bytes ![]()

Simple but Secure AIO OTP solution. Supports,

Table of Contents

Prerequisites

Language: PHP 8.2/+

Library Version PHP Version
3.x.x/+ 8.2.x or Higher
2.x.x 8.x.x
1.x.x 7.x.x

Installation

Why this library?

TOTP & HOTP

Generic OTP

OCRA

Usage

HOTP (RFC4226)

The getProvisioningUriQR & getProvisioningUri accepts 3rd parameter, where it takes array of parameters ['algorithm', 'digits', 'period', 'counter']. Problem you might encounter, with the URI/Image is that most of the OTP generator might not support all of those options. In that case, passing in a blank array will remove all the optional keys, or you can pass in selective parameters as you need. Additionally, you can also pass in additional parameter to reflect in URI string or QR image in 4th parameter. But be cautious that, it might not be supported by the Client Apps.

TOTP (RFC6238)

The getProvisioningUriQR & getProvisioningUri accepts 3rd parameter, where it takes array of parameters ['algorithm', 'digits', 'period', 'counter']. Problem you might encounter, with the URI/Image is that most of the OTP generator might not support all of those options. In that case, passing in a blank array will remove all the optional keys, or you can pass in selective parameters as you need. Additionally, you can also pass in additional parameter to reflect in URI string or QR image in 4th parameter. But be cautious that, it might not be supported by the Client Apps.

On 3rd parameter (bool) it supports, enabling leeway. If enabled, it will also check with last segment's generated otp.

Generic OTP

On 3rd parameter setting false will keep the record till the otp is verified or expired. By default, will keep the record till the key name match or the otp is verified or expired

Generic OTP uses temporary location for storage, make sure you have proper access permission

OCRA (RFC6287)

Forming an OCRA Suite

According to current RFC6287, an example string should be in the following format:

Here OCRA-1:HOTP- is fixed as of current documentation.

Format (F) Up to Length (xx)
A (alphanumeric) 04-64
N (numeric) 04-64
H (hexadecimal) 04-64
Time-Step Size (G) Examples
[1-59]S number of seconds, e.g., 20S
[1-59]M number of minutes, e.g., 5M
[0-48]H number of hours, e.g., 24H

Support

Having trouble? Create an issue!

References


All versions of otp with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
bacon/bacon-qr-code Version ^3.0
paragonie/constant_time_encoding Version ^3.0
symfony/cache Version ^7.0
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 abmmhasan/otp contains the following files

Loading the files please wait ....