You are here

protected function JWKFetcher::convertCertToPem in Auth0 Single Sign On 8.2

Convert a certificate to PEM format.

Parameters

string $cert X509 certificate to convert to PEM format.:

Return value

string

3 calls to JWKFetcher::convertCertToPem()
JWKFetcher::fetchKeys in vendor/auth0/auth0-php/src/Helpers/JWKFetcher.php
Appends the default JWKS path to a token issuer to return all keys from a JWKS.
JWKFetcher::getKeys in vendor/auth0/auth0-php/src/Helpers/JWKFetcher.php
Gets an array of keys from the JWKS as kid => x5c.
JWKFetcher::requestJwkX5c in vendor/auth0/auth0-php/src/Helpers/JWKFetcher.php
Fetch x509 cert for RS256 token decoding.

File

vendor/auth0/auth0-php/src/Helpers/JWKFetcher.php, line 57

Class

JWKFetcher
Class JWKFetcher.

Namespace

Auth0\SDK\Helpers

Code

protected function convertCertToPem($cert) {
  $output = '-----BEGIN CERTIFICATE-----' . PHP_EOL;
  $output .= chunk_split($cert, 64, PHP_EOL);
  $output .= '-----END CERTIFICATE-----' . PHP_EOL;
  return $output;
}