18 $prompt = $request->
query(
'prompt',
'consent');
19 if ($prompt ==
'none') {
20 if (is_null($user_id)) {
21 $error =
'login_required';
22 $error_message =
'The user must log in';
24 $error =
'interaction_required';
25 $error_message =
'The user must grant access to your application';
28 $error =
'consent_required';
29 $error_message =
'The user denied access to your application';
32 $response->
setRedirect($this->config[
'redirect_status_code'], $redirect_uri, $this->
getState(), $error, $error_message);
37 if (!$params = parent::buildAuthorizeParameters($request, $response, $user_id)) {
43 $params[
'id_token'] = $this->responseTypes[
'id_token']->createIdToken($this->
getClientId(), $user_id, $this->nonce);
47 $params[
'nonce'] = $this->nonce;
54 if (!parent::validateAuthorizeRequest($request, $response)) {
58 $nonce = $request->
query(
'nonce');
61 if (!$nonce && in_array($this->
getResponseType(), array(self::RESPONSE_TYPE_ID_TOKEN, self::RESPONSE_TYPE_ID_TOKEN_TOKEN))) {
62 $response->
setError(400,
'invalid_nonce',
'This application requires you specify a nonce parameter');
67 $this->nonce = $nonce;
75 self::RESPONSE_TYPE_ACCESS_TOKEN,
76 self::RESPONSE_TYPE_AUTHORIZATION_CODE,
77 self::RESPONSE_TYPE_ID_TOKEN,
78 self::RESPONSE_TYPE_ID_TOKEN_TOKEN,
79 self::RESPONSE_TYPE_CODE_ID_TOKEN,
99 return $this->scopeUtil->checkScope(
'openid', $request_scope);