Lcobucci
class Lcobucci extends Provider implements ProviderContract
Constants
| ALGO_HS256 |
|
| ALGO_HS384 |
|
| ALGO_HS512 |
|
| ALGO_RS256 |
|
| ALGO_RS384 |
|
| ALGO_RS512 |
|
| ALGO_ES256 |
|
| ALGO_ES384 |
|
| ALGO_ES512 |
|
Properties
| protected Signer | $signer | \Lcobucci\JWT\Signer. | |
| protected Configuration | $config | \Lcobucci\JWT\Configuration. | |
| protected array | $signers | Signers that this provider supports. |
Methods
Create the Lcobucci provider.
Get the array of keys used to sign tokens with an asymmetric algorithm.
Get the public key used to sign tokens with an asymmetric algorithm.
Get the private key used to sign tokens with an asymmetric algorithm.
Get the passphrase used to sign tokens with an asymmetric algorithm.
No description
No description
Determine if the algorithm is asymmetric, and thus requires a public/private key combo.
Rebuild cached derived state after a configuration change.
Create a JSON Web Token.
Decode a JSON Web Token.
Create an instance of the builder with all of the claims applied.
Build the configuration.
Get the signer instance.
Get the signing key instance.
Details
at line 40
__construct(string $secret, string $algo, array $keys, Configuration|null $config = null)
Create the Lcobucci provider.
in
Provider at line 47
Provider
setAlgo(string $algo)
Set the algorithm used to sign the token.
Boot-only. Providers are cached on the singleton JwtManager; runtime mutation affects every subsequent request and races across coroutines.
in
Provider at line 58
string
getAlgo()
Get the algorithm used to sign the token.
in
Provider at line 71
Provider
setSecret(string $secret)
Set the secret used to sign the token.
Boot-only. Providers are cached on the singleton JwtManager; runtime mutation affects every subsequent request and races across coroutines.
in
Provider at line 82
string
getSecret()
Get the secret used to sign the token.
in
Provider at line 95
Provider
setKeys(array $keys)
Set the keys used to sign the token.
Boot-only. Providers are cached on the singleton JwtManager; runtime mutation affects every subsequent request and races across coroutines.
in
Provider at line 106
array
getKeys()
Get the array of keys used to sign tokens with an asymmetric algorithm.
in
Provider at line 114
string|null
getPublicKey()
Get the public key used to sign tokens with an asymmetric algorithm.
in
Provider at line 122
string|null
getPrivateKey()
Get the private key used to sign tokens with an asymmetric algorithm.
in
Provider at line 131
string|null
getPassphrase()
Get the passphrase used to sign tokens with an asymmetric algorithm.
at line 213
protected mixed
getSigningKey()
No description
at line 233
protected mixed
getVerificationKey()
No description
at line 204
protected bool
isAsymmetric()
Determine if the algorithm is asymmetric, and thus requires a public/private key combo.
at line 177
protected void
onConfigurationChanged()
Rebuild cached derived state after a configuration change.
Signer is rebuilt before config because buildConfig() reads $this->signer.
at line 68
string
encode(array $payload)
Create a JSON Web Token.
at line 86
array
decode(string $token)
Decode a JSON Web Token.
at line 115
protected Builder
getBuilderFromClaims(array $payload)
Create an instance of the builder with all of the claims applied.
at line 155
protected Configuration
buildConfig()
Build the configuration.
at line 188
protected Signer
getSigner()
Get the signer instance.
at line 253
protected Key
getKey(string $contents, string $passphrase = '')
Get the signing key instance.