Provider
abstract class Provider
Constants
| ALGO_HS256 |
|
| ALGO_HS384 |
|
| ALGO_HS512 |
|
| ALGO_RS256 |
|
| ALGO_RS384 |
|
| ALGO_RS512 |
|
| ALGO_ES256 |
|
| ALGO_ES384 |
|
| ALGO_ES512 |
|
Methods
Constructor.
Get the algorithm used to sign the token.
Get the secret used to sign the token.
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.
Get the key used to sign the tokens.
Get the key used to verify the tokens.
Determine if the algorithm is asymmetric, and thus requires a public/private key combo.
Hook fired after any of algo/secret/keys is mutated.
Details
at line 32
__construct(string $secret, string $algo, array $keys)
Constructor.
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.
at line 58
string
getAlgo()
Get the algorithm used to sign the token.
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.
at line 82
string
getSecret()
Get the secret used to sign the token.
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.
at line 106
array
getKeys()
Get the array of keys used to sign tokens with an asymmetric algorithm.
at line 114
string|null
getPublicKey()
Get the public key used to sign tokens with an asymmetric algorithm.
at line 122
string|null
getPrivateKey()
Get the private key used to sign tokens with an asymmetric algorithm.
at line 131
string|null
getPassphrase()
Get the passphrase used to sign tokens with an asymmetric algorithm.
at line 139
protected mixed
getSigningKey()
Get the key used to sign the tokens.
at line 147
protected mixed
getVerificationKey()
Get the key used to verify the tokens.
at line 155
abstract protected bool
isAsymmetric()
Determine if the algorithm is asymmetric, and thus requires a public/private key combo.
at line 163
protected void
onConfigurationChanged()
Hook fired after any of algo/secret/keys is mutated.
Subclasses that cache derived state (signers, configuration objects) override this to rebuild it so the new values actually take effect.