locksmith / sdk-php
PHP client for the Locksmith public auth API
dev-main
2026-04-30 00:50 UTC
Requires
- php: >=8.2
- ext-json: *
- firebase/php-jwt: ^6.10
This package is not auto-updated.
Last update: 2026-05-01 00:37:29 UTC
README
Official PHP 8.2+ client for the Locksmith public auth API.
Install
composer require locksmith/sdk-php
Requirements
- PHP 8.2+ with
ext-json - API key prefix
lsm_live_orlsm_sbx_.
Quick start
<?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.
Local JWT verification
$payload = $client->verifyTokenLocal($accessToken, $publicKeyPem);
License
MIT