rinvex/authy
Composer 安装命令:
composer require rinvex/authy
包简介
Rinvex Authy is a simple wrapper for Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.
关键字:
README 文档
README
Rinvex Authy is a simple wrapper for Authy TOTP API, the best rated Two-Factor Authentication service for consumers, simplest 2fa Rest API for developers and a strong authentication platform for the enterprise.
Table Of Contents
- Usage
- Installation
- Upgrade
- Changelog
- Support
- Contributing & Protocols
- Security Vulnerabilities
- About Rinvex
- Trademarks
- License
Usage
Usage is pretty easy and straightforward:
Prepare requirements
$apiKey = 'AuthySecretKey'; $httpClient = new \GuzzleHttp\Client();
Note: make sure to replace
AuthySecretKeywith your secret key from the installation steps.
Authy App
Create a new Authy app instance and interact with it:
$authyApp = new \Rinvex\Authy\App($httpClient, $apiKey); $appStats = $authyApp->stats(); // Get app stats $appDetails = $authyApp->details(); // Get app details
Authy User
Create a new Authy user instance and interact with it:
$authyUser = new \Rinvex\Authy\User($httpClient, $apiKey); $user = $authyUser->register('user@domain.com', '317-338-9302', '54'); // Register user $userActivity = $authyUser->registerActivity($user->get('user')['id'], 'cookie_login', 'Test Data'); // Register user activity $userStatus = $authyUser->status($user->get('user')['id']); // Get user status $userDeleted = $authyUser->delete($user->get('user')['id']); // Delete user
Authy Token
Create a new Authy token instance and interact with it:
$authyToken = new \Rinvex\Authy\Token($httpClient, $apiKey); $smsTokenSent = $authyToken->send($user->get('user')['id'], 'sms'); // Send SMS token $callTokenStarted = $authyToken->send($user->get('user')['id'], 'call'); // Start automated call $tokenVerified = $authyToken->verify(54321, $user->get('user')['id']); // Verify token
Intuitive Responses
Work Intuitively with Authy responses:
$body = $tokenVerified->body(); // Get all response body $code = $tokenVerified->statusCode(); // Get response status code $succeed = $tokenVerified->succeed(); // Check whether respose is a success $failed = $tokenVerified->failed(); // Check whether respose is a failure $message = $tokenVerified->message(); // Get response message $item = $tokenVerified->get('item'); // Get response body item $errors = $tokenVerified->errors(); // Get response errors
Note: All authy requests return authy response, with a unified interface for your convenience, so you can interact with all responses the same way as above.
Installation
-
Install the package via composer:
composer require rinvex/authy
-
If you haven't already: Register an Authy account -> Sign in -> Access dashboard -> Create new application -> Copy your API Secret key
-
Done! You can refer to Usage again.
Upgrade
-
Upgrading To
v2.xFromv1.xAPI implementation is 100% backward compatible, but sandbox API has been dropped since it's officially deprecated. Also note that PHP7 is now required.
Changelog
Refer to the Changelog for a full history of the project.
Support
The following support channels are available at your fingertips:
Contributing & Protocols
Thank you for considering contributing to this project! The contribution guide can be found in CONTRIBUTING.md.
Bug reports, feature requests, and pull requests are very welcome.
Security Vulnerabilities
If you discover a security vulnerability within this project, please send an e-mail to help@rinvex.com. All security vulnerabilities will be promptly addressed.
About Rinvex
Rinvex is a software solutions startup, specialized in integrated enterprise solutions for SMEs established in Alexandria, Egypt since June 2016. We believe that our drive The Value, The Reach, and The Impact is what differentiates us and unleash the endless possibilities of our philosophy through the power of software. We like to call it Innovation At The Speed Of Life. That’s how we do our share of advancing humanity.
Trademarks
- Authy™ is a trademark of Twilio Inc.
License
This software is released under The MIT License (MIT).
(c) 2016-2022 Rinvex LLC, Some rights reserved.
rinvex/authy 适用场景与选型建议
rinvex/authy 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 197.11k 次下载、GitHub Stars 达 35, 最近一次更新时间为 2016 年 11 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「security」 「Authentication」 「sms」 「message」 「phone」 「register」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 rinvex/authy 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rinvex/authy 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 rinvex/authy 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Provide a way to secure accesses to all routes of an symfony application.
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
It's a barebone security class written on PHP
Email Toolkit Plugin for CakePHP
统计信息
- 总下载量: 197.11k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 36
- 点击次数: 36
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-14