Skip to content

locksmith-app/sdk-php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

locksmith/sdk-php

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_ or lsm_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

About

Locksmith authentication API client (php)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages