fortytwo/php-sdk-two-factor-authentication 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

fortytwo/php-sdk-two-factor-authentication

Composer 安装命令:

composer require fortytwo/php-sdk-two-factor-authentication

包简介

Fortytwo’s Two-Factor Authentication (2FA) API adds an additional layer of security to your users’ login credentials with a unique one-time code which limits the risk of fraudulent access to your website.

README 文档

README

This SDK help you to use the Two Factor Authentication service from FortyTwo Telecom

How to use it:

With composer:

Using composer:

    composer require fortytwo/php-sdk-two-factor-authentication

directly:

You can download the library from the Fortytwo Telecom website or on our official Github repository.

Testing:

Execute the following command on the project directory:

vendor/bin/phpunit -c tests/Phpunit.xml

Currently the code coverage is 100%.

API:

The SDK expose 2 main functions:

TwoFactorAuthentication::requestCode()

Parameters:

Name Type Required Description
clientRef String Yes Client reference.
phoneNumber String Yes Destination Phone number.
optionalArgs Array No List of optionals arguments

List of optionals arguments:

Name Type Default Constraints Description
codeLength Integer 6 Maximum value 20 2FA Code
codeType String Numeric alpha, numeric or alphanumeric 2FA Code type.
caseSensitive Boolean null True or False 2FA Code case sensitive
callbackUrl String null URL format withscheme (http/https) 2FA Callback URL.
senderId String null - Custom sender ID.
messageTemplate String null {#TFA_CODE} Required Custom message template

You can found a more detailled description of each parameter in the API documentation

TwoFactorAuthentication::validateCode()

Parameters:

Name Type Required Description
clientRef String Yes Client reference.
code String Yes 2FA Code.

You can found a more detailled description of each parameter in the API documentation

统计信息

  • 总下载量: 1.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-25

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固