passbase / passbase-php
# 简介 <span class="subtext"> 欢迎来到Passbase验证API文档。本文档将帮助您了解我们的模型和验证API及其端点。基于此,您可以构建自己的系统(例如验证)并将其连接到Passbase。如有反馈
2.0.0
2022-03-25 07:32 UTC
Requires
- php: ^7.3 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.12
- phpunit/phpunit: ^8.0 || ^9.0
README
简介
<span class="subtext"> 欢迎来到Passbase验证API文档。本文档将帮助您了解我们的模型和验证API及其端点。基于此,您可以构建自己的系统(例如验证)并将其连接到Passbase。
如有反馈或疑问,您可以通过以下邮箱联系我们: developer@passbase.com。
用户在Passbase客户端集成引导下提交视频自拍照和有效的身份证明材料。一旦提交所有必要的资源,数据点将被提取、数字化和验证。这些数据点随后成为用户的身份的一部分。然后用户同意与您共享其身份中的资源和/或数据点。这些信息将传递给您,可用于对用户做出决定(例如激活账户)。下表进一步解释了我们的术语。
身份验证
<span class="subtext"> API有两种身份验证形式
• API密钥
• Bearer JWT令牌
安装与使用
要求
PHP 7.3及更高版本。也应在PHP 8.0或8.1上工作,但尚未测试。
Composer
要使用Composer安装绑定,请将以下内容添加到composer.json
{ "repositories": [ { "type": "vcs", "url": "https://github.com/passbase/passbase-php.git" } ], "require": { "passbase/passbase-php": "*@dev" } }
然后运行composer install
手动安装
下载文件并包含autoload.php
<?php require_once('/path/to/passbase/vendor/autoload.php');
入门
请遵循安装过程,然后运行以下命令
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: SecretApiKey $config = Passbase\Configuration::getDefaultConfiguration()->setApiKey('X-API-KEY', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Passbase\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-KEY', 'Bearer'); $apiInstance = new Passbase\Api\IdentityApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. new GuzzleHttp\Client(), $config ); $id = 'id_example'; // string | Unique ID of the identity to return try { $result = $apiInstance->getIdentityById($id); print_r($result); } catch (Exception $e) { echo 'Exception when calling IdentityApi->getIdentityById: ', $e->getMessage(), PHP_EOL; }
API端点
所有URI都是相对于https://api.passbase.com/verification/v2
模型
授权
身份访问令牌
- 类型: Bearer身份验证(JWT)
可发布API密钥
- 类型: API密钥
- API密钥参数名: X-API-KEY
- 位置: HTTP头部
秘密API密钥
- 类型: API密钥
- API密钥参数名: X-API-KEY
- 位置: HTTP头部
测试
要运行测试,请使用
composer install vendor/bin/phpunit
作者
关于此包
此PHP包是由OpenAPI Generator项目自动生成的
- API版本:
1.0.0
- 包版本:
2.0.0
- 包版本:
- 构建包:
org.openapitools.codegen.languages.PhpClientCodegen