You are here

public function OpenIDConnectLinkedinClient::authorize in OpenID Connect / OAuth client 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/OpenIDConnectClient/OpenIDConnectLinkedinClient.php \Drupal\openid_connect\Plugin\OpenIDConnectClient\OpenIDConnectLinkedinClient::authorize()

Redirects the user to the authorization endpoint.

The authorization endpoint authenticates the user and returns them to the redirect_uri specified previously with an authorization code that can be exchanged for an access token.

Parameters

string $scope: Name of scope(s) that with user consent will provide access to otherwise restricted user data. Defaults to "openid email".

Return value

\Symfony\Component\HttpFoundation\Response A response object.

Overrides OpenIDConnectClientBase::authorize

File

src/Plugin/OpenIDConnectClient/OpenIDConnectLinkedinClient.php, line 51

Class

OpenIDConnectLinkedinClient
LinkedIn OpenID Connect client.

Namespace

Drupal\openid_connect\Plugin\OpenIDConnectClient

Code

public function authorize(string $scope = 'openid email') : Response {

  // Use LinkedIn specific authorisations.
  return parent::authorize('r_liteprofile r_emailaddress');
}