Download the PHP package identio/php-sdk without Composer
On this page you can find all versions of the php package identio/php-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download identio/php-sdk
More information about identio/php-sdk
Files in identio/php-sdk
Package php-sdk
Short Description Framework-independent PHP SDK for Identio authentication and social login APIs.
License proprietary
Informations about the package php-sdk
Identio PHP SDK
Framework-independent PHP client for Identio. The package mirrors the public responsibilities of the Java SDK while remaining usable from Laravel, Symfony and ordinary PHP applications.
Requirements
- PHP 8.2+
- Guzzle 7
Installation
Until the package is published, add its Git repository as a Composer VCS repository or use a local path repository.
Client creation
The API token is sent only from the server as Authorization: Bearer .... Never expose it in browser JavaScript.
Registration with email confirmation
Identio creates the account and sends its own OTP confirmation email. Registration usually returns no authenticated token until the confirmation link is processed.
Email login
Other email operations:
Profile values
The configured domain API token can also read and update another user's ordinary profile values from a server-side administrator integration:
The host application must authorize the administrator action. The SDK sends a
regular GET or PUT /api/external/domains/{domainId}/users/{userId} request;
the role remains an ordinary Identio profile value and is never a system DTO
property.
Social login
Supported providers are Google, Yandex, VK and Facebook.
Callback:
SocialFlowManager stores and consumes Identio state, checks the ten-minute flow lifetime, verifies provider matching and preserves the VK PKCE verifier.
When Identio returns registrationRequired = true, collect the mandatory profile values and finish through the one-time registration token:
Laravel registration
Register one singleton in a service provider:
For the social flow, implement Identio\Sdk\Social\SocialSessionStore as a thin adapter over Laravel's session store. PortalKit can then use the same SDK without copying Identio HTTP contracts into the application.
Exceptions
All SDK exceptions inherit from Identio\Sdk\Exception\IdentioException.
TransportException: network or HTTP-client failure before a response is received.AuthenticationException: HTTP 401.ForbiddenException: HTTP 403.NotFoundException: HTTP 404.ConflictException: HTTP 409.ValidationException: HTTP 400 or 422.ServerException: HTTP 5xx.SocialFlowException: local OAuth session/state validation failure.
An ApiException exposes statusCode and the decoded responseBody.
The email login() method returns an AuthResult with isRejected() === true
for expected credential/account rejections such as a missing user, invalid
password, unconfirmed email or inactive user. The rejection contains its
machine-readable code, API message, HTTP statusCode and decoded response
body. These expected outcomes do not throw exceptions or produce API error
warnings. Transport failures, server failures, invalid domain credentials and
other unexpected API responses remain exceptions.
Social-provider update callback verification
The SDK reproduces the Java SDK HMAC-SHA256 signature algorithm: