diff --git a/lib/WP_Auth0_Api_Client.php b/lib/WP_Auth0_Api_Client.php index 30c4e49b..b275eb39 100755 --- a/lib/WP_Auth0_Api_Client.php +++ b/lib/WP_Auth0_Api_Client.php @@ -1039,7 +1039,7 @@ public static function update_guardian($domain, $app_token, $factor, $enabled) { return json_decode($response['body']); } - protected function convertCertToPem($cert) { + protected static function convert_cert_to_pem( $cert ) { return '-----BEGIN CERTIFICATE-----'.PHP_EOL .chunk_split($cert, 64, PHP_EOL) .'-----END CERTIFICATE-----'.PHP_EOL; @@ -1076,7 +1076,7 @@ public static function JWKfetch($domain) { $jwks = json_decode($response['body'], true); foreach ($jwks['keys'] as $key) { - $secret[$key['kid']] = self::convertCertToPem($key['x5c'][0]); + $secret[$key['kid']] = self::convert_cert_to_pem($key['x5c'][0]); } if ($cache_expiration !== 0) { @@ -1102,4 +1102,16 @@ public static function get_client_grant_types() { 'client_credentials', ); } + + /** + * DEPRECATED 3.5.2 + * + * @param $cert + * + * @return string + */ + protected function convertCertToPem( $cert ) { + trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); + return self::convert_cert_to_pem( $cert ); + } } \ No newline at end of file diff --git a/lib/WP_Auth0_LoginManager.php b/lib/WP_Auth0_LoginManager.php index 3f112512..326a56ab 100755 --- a/lib/WP_Auth0_LoginManager.php +++ b/lib/WP_Auth0_LoginManager.php @@ -544,7 +544,7 @@ protected function query_vars( $key ) { * @param $id_token */ private function dieWithVerifyEmail( $userinfo, $id_token = '' ) { - trigger_error( __( 'Method dieWithVerifyEmail is deprecated.', 'wp-auth0' ), E_USER_DEPRECATED); + trigger_error( sprintf( __( 'Method %s is deprecated.', 'wp-auth0' ), __METHOD__ ), E_USER_DEPRECATED ); WP_Auth0_Email_Verification::render_die( $userinfo ); } } \ No newline at end of file