You are here

public function LinkedInAuthManager::getAuthenticationUrl in Open Social 8

Same name and namespace in other branches
  1. 8.9 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  2. 8.2 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  3. 8.3 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  4. 8.4 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  5. 8.5 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  6. 8.6 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  7. 8.7 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()
  8. 8.8 modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php \Drupal\social_auth_linkedin\LinkedInAuthManager::getAuthenticationUrl()

Returns the login URL where user will be redirected for authentication.

Parameters

string $type: Type of action. "login" or "register".

array $scope: List of permissions which should be asked during authentication.

Return value

string Absolute URL.

Overrides AuthManagerInterface::getAuthenticationUrl

File

modules/custom/social_auth_linkedin/src/LinkedInAuthManager.php, line 39

Class

LinkedInAuthManager
Class LinkedInAuthManager.

Namespace

Drupal\social_auth_linkedin

Code

public function getAuthenticationUrl($type, array $scope = [
  'r_basicprofile',
  'r_emailaddress',
]) {
  return $this->sdk
    ->getLoginUrl([
    'redirect_uri' => $this
      ->getRedirectUrl($type),
    'scope' => implode(',', $scope),
  ]);
}