You are here

function oauth2_server_base64url_encode in OAuth2 Server 7

Encodes a string as base64url.

Parameters

string $data: The string to encode.

Return value

string The encoded data.

1 call to oauth2_server_base64url_encode()
Storage::getAuthorizationCode in lib/Drupal/oauth2_server/Storage.php

File

./oauth2_server.module, line 891
Provides OAuth2 server functionality.

Code

function oauth2_server_base64url_encode($data) {
  return str_replace(array(
    '+',
    '/',
  ), array(
    '-',
    '_',
  ), base64_encode($data));
}