Usage
Your RSA public key must be accessible in the filesystem.
The KeyConfiguration
Use the KeyConfiguration to let JWKs know what your public key looks like.
$keyConfig = new KeyConfiguration(
'MY_KEY_ID',
'RSA256',
'Use'
);By default:
KeyIdwill be automatically generated per requestAlgorithmwill beRSA256(can be changed injwks.phpconfiguration file)Usewill benull
Create a Key from Raw Content
use ShipSaasLaravelJwks\Entities\Key;
$key = Key::fromRaw($content, $keyConfig);Create a Key using the file path
Please use the exact file path.
Resolve JWK
To PHP array
To String (JSON)
Create a KeySet
KeySet contains 1 or multiple keys
Default JWKs endpoint
We also ship a default endpoint that prepares the configured keys and returns the JWKs content.
Endpoint: auth/jwks
Last updated