Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
JWT::getKeyMaterialAndAlgorithm( FirebaseJWTKey|FirebaseJWTarray|mixed $keyOrKeyArray, string|null $kid = null )
Determine if an algorithm has been provided for each Key
Contents
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Warning: foreach() argument must be of type array|object, string given in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 830
Warning: Array to string conversion in /home/customer/www/docs.automatorplugin.com/public_html/wp-content/themes/wporg-developer/inc/template-tags.php on line 825
Parameters Parameters
- $keyOrKeyArray
(Required)
- $kid
(Optional)
Default value: null
Return Return
(array) containing the keyMaterial and algorithm
Source Source
File: vendor/firebase/php-jwt/src/JWT.php
private static function getKeyMaterialAndAlgorithm($keyOrKeyArray, $kid = null) { if ( is_string($keyOrKeyArray) || is_resource($keyOrKeyArray) || $keyOrKeyArray instanceof OpenSSLAsymmetricKey ) { return array($keyOrKeyArray, null); } if ($keyOrKeyArray instanceof Key) { return array($keyOrKeyArray->getKeyMaterial(), $keyOrKeyArray->getAlgorithm()); } if (is_array($keyOrKeyArray) || $keyOrKeyArray instanceof ArrayAccess) { if (!isset($kid)) { throw new UnexpectedValueException('"kid" empty, unable to lookup correct key'); } if (!isset($keyOrKeyArray[$kid])) { throw new UnexpectedValueException('"kid" invalid, unable to lookup correct key'); } $key = $keyOrKeyArray[$kid]; if ($key instanceof Key) { return array($key->getKeyMaterial(), $key->getAlgorithm()); } return array($key, null); } throw new UnexpectedValueException( '$keyOrKeyArray must be a string|resource key, an array of string|resource keys, ' . 'an instance of Firebase\JWT\Key key or an array of Firebase\JWT\Key keys' ); }
Expand full source code Collapse full source code View on Github