authsignal / authsignal-php
Authsignal is a passwordless authentication/multifactor authentication step up service with a FraudOps rules engine
Installs: 13 148
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 1
Requires
- firebase/php-jwt: ^6.8
Requires (Dev)
- donatj/mock-webserver: ^2.5
- phpunit/phpunit: ^9.5
- dev-main
- v4.1.0
- 4.0.0
- 3.0.1
- 3.0.0
- 2.0.2
- 2.0.0
- 1.0.3.x-dev
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-enhancement/pr-template
- dev-snake-case-user-agent
- dev-fix-release-drafter
- dev-include-version-header
- dev-release-drafter
- dev-codeowners
- dev-AUT-1445-PHP7Compat
- dev-justinsoong-patch-1
- dev-AUT-1442-AllowOptionaUserId
- dev-AUT-1440-AddValidateChallenge
- dev-guzzle-experiment
This package is auto-updated.
Last update: 2025-04-02 04:26:49 UTC
README
Check out our official PHP SDK documentation.
Installation
-
Add Authsignal's library to your project using Composer:
composer require authsignal/authsignal-php
-
Run
composer update
to install the dependencies. -
Authsignal will now be autoloaded into your project.
Initialization
Initialize the Authsignal SDK, ensuring you do not hard code the Authsignal Secret Key, always keep this safe.
Authsignal::setApiSecretKey('secretKey');
You can find your secretKey
in the Authsignal Portal.
Region selection
Authsignal has multiple api hosting regions. To view your hostname for your tenant, find it in the Authsignal Portal.
Region | Base URL |
---|---|
US (Oregon) | https://signal.authsignal.com/v1 |
AU (Sydney) | https://au.signal.authsignal.com/v1 |
EU (Dublin) | https://eu.signal.authsignal.com/v1 |
You can set the hostname via the following code. If the setApiUrl
function is not called, the api call defaults to the main Authsignal US region hostname https://signal.authsignal.com
An example setting the client to use the AU region.
Authsignal::setApiUrl("https://au.signal.authsignal.com/v1");
Alternatively, an environment variable can be used to set the API URL:
AUTHSIGNAL_API_URL=https://au.signal.authsignal.com/v1
Usage
Authsignal's server side signal API has five main calls track
, getAction
, getUser
, enrollVerifiedAuthenticator
, verifyChallenge
For more details on these api calls, refer to our official PHP SDK docs.
Response & Error handling
Example:
$result = Authsignal::updateAction( userId: $userId, action: $action, idempotencyKey: "invalidKey", attributes: ['state' => 'CHALLENGE_FAILED'] ); # PHP Fatal error: Uncaught AuthsignalNotFoundError: 404 - not_found
License
The library is available as open source under the terms of the MIT License.