JWTTemplate (Clerk SDK v1.0.1)
JWT Templates allow you to generate custom authentication tokens tied to authenticated sessions, enabling you to integrate with third-party services.
Summary
Functions
Create a new JWT template
Deletes a JWT template
Retrieve the details of a given JWT template
Lists all JWT templates
Updates an existing JWT template
Functions
create(params, opts \\ [])
Create a new JWT template
REQUEST BODY SCHEMA: application/json
name
string JWT template name
claims
object JWT template claims in JSON format
lifetime
number or null [ 30 .. 315360000 ] JWT token lifetime
allowed_clock_skew
number or null [ 0 .. 300 ] JWT token allowed clock skew
custom_signing_key
boolean Whether a custom signing key/algorithm is also provided for this template
signing_algorithm
string or null The custom signing algorithm to use when minting JWTs
signing_key
string or null The custom signing private key to use when minting JWTs
delete(id, opts \\ [])
Deletes a JWT template
get(id, opts \\ [])
Retrieve the details of a given JWT template
list(opts \\ [])
Lists all JWT templates
update(id, params, opts \\ [])
Updates an existing JWT template
REQUEST BODY SCHEMA: application/json
name
string JWT template name
claims
object JWT template claims in JSON format
lifetime
number or null [ 30 .. 315360000 ] JWT token lifetime
allowed_clock_skew
number or null [ 0 .. 300 ] JWT token allowed clock skew
custom_signing_key
boolean Whether a custom signing key/algorithm is also provided for this template
signing_algorithm
string or null The custom signing algorithm to use when minting JWTs
signing_key
string or null The custom signing private key to use when minting JWTs