You are here

private function AuthController::generatePassword in Auth0 Single Sign On 8

Same name and namespace in other branches
  1. 8.2 src/Controller/AuthController.php \Drupal\auth0\Controller\AuthController::generatePassword()
1 call to AuthController::generatePassword()
AuthController::createDrupalUser in src/Controller/AuthController.php
Create the Drupal user based on the Auth0 user profile.

File

src/Controller/AuthController.php, line 471

Class

AuthController
Controller routines for auth0 authentication.

Namespace

Drupal\auth0\Controller

Code

private function generatePassword($length) {
  return substr(preg_replace("/[^a-zA-Z0-9]\\+\\//", "", base64_encode($this
    ->getRandomBytes($length + 1))), 0, $length);
}