passageidentity / passage-php
Passage's management API to manage your Passage apps and users.
dev-main
2024-04-03 22:07 UTC
Requires
- php: ^7.4 || ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- firebase/php-jwt: ^6.5.0
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
- phpfastcache/phpfastcache: ^9.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^9.0
- vlucas/phpdotenv: ^5.6
- dev-main
- dev-sdk-updates-1714000689
- dev-sdk-updates-1713999127
- dev-sdk-updates-1713806970
- dev-sdk-updates-1712850995
- dev-sdk-updates-1712354758
- dev-sdk-updates-1712258049
- dev-sdk-updates-1712246487
- dev-PSG-3797-cleanup-gha
- dev-sdk-updates-1710976404
- dev-sdk-updates-1710970331
- dev-sdk-updates-1710785416
- dev-sdk-updates-1710374403
- dev-sdk-updates-1710178398
- dev-sdk-updates-1709756899
- dev-sdk-updates-1709318423
- dev-sdk-updates-1706808691
- dev-fix-generate-command-docs-removal
- dev-sdk-updates-1706576216
- dev-sdk-updates-1706557956
- dev-sdk-updates-1706211961
- dev-sdk-updates-1705013968
- dev-bump-v0.2.1
- dev-sdk-updates-1702659273
- dev-sdk-updates-1702506620
- dev-sdk-updates-1701819393
- dev-add-on-pull-request-github-action
- dev-PSG-2913-wrap-api-calls
- dev-sdk-updates-1701276778
- dev-sdk-updates-1701207966
- dev-sdk-updates-1701196658
- dev-PSG-3173-update-readme-to-include-token-function
- dev-sdk-updates-1699313440
- dev-PSG-3123-documentation
- dev-sdk-updates-1698184176
This package is not auto-updated.
Last update: 2024-05-01 22:26:24 UTC
README
passage-php
This PHP SDK allows for verification of server-side authentication for applications using Passage
For more information, please visit Passage Documentation.
Installation & Usage
Requirements
PHP 7.4 and later. Should also work with PHP 8.0.
Composer
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
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');
Getting Started
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; }
API Endpoints
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 |
Models
- AppInfo
- AppResponse
- CreateMagicLinkRequest
- CreateUserRequest
- ElementCustomization
- FontFamily
- LayoutConfig
- Layouts
- ListDevicesResponse
- MagicLink
- MagicLinkResponse
- MagicLinkType
- Model400Error
- Model401Error
- Model404Error
- Model500Error
- Technologies
- UpdateUserRequest
- UserEventInfo
- UserInfo
- UserMetadataField
- UserMetadataFieldType
- UserResponse
- WebAuthnDevices
Authorization
Authentication schemes defined for the API:
bearerAuth
Type: Bearer authentication (JWT)
Method: validateJWT
Tests
To run the tests, use:
composer install vendor/bin/phpunit