Official PHP 8.2+ client for the Locksmith public auth API.
composer require locksmith/sdk-php- PHP 8.2+ with
ext-json - API key prefix
lsm_live_orlsm_sbx_.
<?php
use Locksmith\LocksmithClient;
$client = new LocksmithClient(getenv('LOCKSMITH_API_KEY'));
$data = $client->signIn('user@example.com', 'secure-password');
echo $data['user']['email'], "\n";
$user = $client->getUser($data['accessToken']);Methods return the inner data object from Locksmith’s JSON envelope.
$payload = $client->verifyTokenLocal($accessToken, $publicKeyPem);MIT