encode() encode( $payload, $key, string $algo = 'HS256') : string Parameters $payload $key string $algo Returns string
decode() decode(string $jwt, null $key = null, array|boolean $allowedAlgorithms = true) : boolean|mixed Parameters string $jwt null $key array|boolean $allowedAlgorithms Returns boolean|mixed
urlSafeB64Decode() urlSafeB64Decode(string $b64) : mixed|string Parameters string $b64 Returns mixed|string
generateJwtHeader() generateJwtHeader( $payload, $algorithm) Override to create a custom header Parameters $payload $algorithm
hash_equals() hash_equals(string $a, string $b) : boolean Parameters string $a string $b Returns boolean
verifySignature() verifySignature( $signature, $input, $key, string $algo = 'HS256') : boolean Parameters $signature $input $key string $algo Throws \InvalidArgumentException Returns boolean
sign() sign( $input, $key, string $algo = 'HS256') : string Parameters $input $key string $algo Throws \Exception Returns string
generateRSASignature() generateRSASignature( $input, $key, string $algo) : mixed Parameters $input $key string $algo Throws \Exception Returns mixed