This PHP SDK allows for verification of server-side authentication for applications using Passage
For more information, please visit Passage Documentation.
PHP 7.4 and later. Should also work with PHP 8.0.
To install the bindings via Composer, add the following to composer.json
:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
}
],
"require": {
"GIT_USER_ID/GIT_REPO_ID": "*@dev"
}
}
Then run composer install
Download the files and include autoload.php
:
<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$app_id = 'app_id_example'; // string | App ID
$api_key = 'app_id_example'; // string | App ID
$passageInstance = new Passage\Client\Controllers\Passage(
$app_id,
$api_key
);
try {
$result = $passageInstance->getApp($app_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AppsApi->getApp: ', $e->getMessage(), PHP_EOL;
}
All URIs are relative to https://api.passage.id/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AppsApi | getApp | GET /apps/{app_id} | Get App |
MagicLinksApi | createMagicLink | POST /apps/{app_id}/magic-links | Create Embeddable Magic Link |
TokensApi | revokeUserRefreshTokens | DELETE /apps/{app_id}/users/{user_id}/tokens | Revokes refresh tokens |
UserDevicesApi | deleteUserDevices | DELETE /apps/{app_id}/users/{user_id}/devices/{device_id} | Delete a device for a user |
UserDevicesApi | listUserDevices | GET /apps/{app_id}/users/{user_id}/devices | List User Devices |
UsersApi | activateUser | PATCH /apps/{app_id}/users/{user_id}/activate | Activate User |
UsersApi | createUser | POST /apps/{app_id}/users | Create User |
UsersApi | deactivateUser | PATCH /apps/{app_id}/users/{user_id}/deactivate | Deactivate User |
UsersApi | deleteUser | DELETE /apps/{app_id}/users/{user_id} | Delete User |
UsersApi | getUser | GET /apps/{app_id}/users/{user_id} | Get User |
UsersApi | getUserByIdentifier | GET /apps/{app_id}/users | Get User By Identifier |
UsersApi | updateUser | PATCH /apps/{app_id}/users/{user_id} | Update User |
- AppInfo
- AppResponse
- CreateMagicLinkRequest
- CreateUserRequest
- ElementCustomization
- FontFamily
- LayoutConfig
- Layouts
- ListDevicesResponse
- MagicLink
- MagicLinkResponse
- MagicLinkType
- Model400Error
- Model401Error
- Model404Error
- Model500Error
- Technologies
- UpdateUserRequest
- UserEventInfo
- UserInfo
- UserMetadataField
- UserMetadataFieldType
- UserResponse
- WebAuthnDevices
Authentication schemes defined for the API:
Type: Bearer authentication (JWT)
Method: validateJWT
To run the tests, use:
composer install
vendor/bin/phpunit