You are here

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

Encode a string with URL-safe Base64.

Parameters

string $input The string you want encoded:

Return value

string The base64 encode of what you passed in

4 calls to JWT::urlsafeB64Encode()
JWT::encode in vendor/firebase/php-jwt/src/JWT.php
Converts and signs a PHP object or array into a JWT string.
TokenTest::testSuccessfulRs256TokenDecoding in vendor/auth0/auth0-php/tests/API/Helpers/TokenGeneratorTest.php
Test a successful RS256 token decoding.
TokenTest::testThatTokenWithBadAlgThrowsException in vendor/auth0/auth0-php/tests/API/Helpers/TokenGeneratorTest.php
Test that a malformed token or missing algorithm fails.
TokenTest::testThatTokenWithInvalidAudThrowsException in vendor/auth0/auth0-php/tests/API/Helpers/TokenGeneratorTest.php
Test that an invalid audience is rejected.

File

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

Class

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

Namespace

Firebase\JWT

Code

public static function urlsafeB64Encode($input) {
  return \str_replace('=', '', \strtr(\base64_encode($input), '+/', '-_'));
}