You are here

public static function JWT::urlsafeB64Decode in Auth0 Single Sign On 8.2

Decode a string with URL-safe Base64.

Parameters

string $input A Base64 encoded string:

Return value

string A decoded string

2 calls to JWT::urlsafeB64Decode()
JWT::decode in vendor/firebase/php-jwt/src/JWT.php
Decodes a JWT string into a PHP object.
JWTVerifier::decodeB64 in vendor/auth0/auth0-php/src/JWTVerifier.php
Base64 decode a string.

File

vendor/firebase/php-jwt/src/JWT.php, line 333

Class

JWT
JSON Web Token implementation, based on this spec: https://tools.ietf.org/html/rfc7519

Namespace

Firebase\JWT

Code

public static function urlsafeB64Decode($input) {
  $remainder = \strlen($input) % 4;
  if ($remainder) {
    $padlen = 4 - $remainder;
    $input .= \str_repeat('=', $padlen);
  }
  return \base64_decode(\strtr($input, '-_', '+/'));
}