getUserPassFromBAuth() static public méthode

Gets the Client/Lrs username and password from the Basic Auth authorization string.
static public getUserPassFromBAuth ( String $authorization ) : [String]
$authorization String
Résultat [String]
 /**
  * Gets the username and password from the authorization string.
  * @return [String] Formed of [Username, Password]
  */
 static function getUserPassFromAuth()
 {
     $authorization = \LockerRequest::header('Authorization');
     if ($authorization !== null && strpos($authorization, 'Basic') === 0) {
         list($username, $password) = Helpers::getUserPassFromBAuth($authorization);
     } else {
         if ($authorization !== null && strpos($authorization, 'Bearer') === 0) {
             list($username, $password) = Helpers::getUserPassFromOAuth($authorization);
         } else {
             throw new Exceptions\Exception('Invalid auth', 400);
         }
     }
     return [$username, $password];
 }