/** * @param OpenIdMessage $message * @param string|null $user_identity_endpoint * @throws InvalidOpenIdMessageException */ public function __construct(OpenIdMessage $message, $user_identity_endpoint = null) { parent::__construct($message); $this->user_identity_endpoint = $user_identity_endpoint; if (!empty($this->user_identity_endpoint)) { if (!str_contains($this->user_identity_endpoint, '@identifier')) { throw new InvalidOpenIdMessageException("user_identity_endpoint value must contain @identifier placeholder!."); } } }
public function getTrustedData(OpenIdRequest $request) { $data = array(); try { $simple_reg_request = new OpenIdSREGRequest($request->getMessage()); if ($simple_reg_request->isValid()) { $attributes = $simple_reg_request->getRequiredAttributes(); $opt_attributes = $simple_reg_request->getOptionalAttributes(); $attributes = array_merge($attributes, $opt_attributes); foreach ($attributes as $key => $value) { array_push($data, $key); } } } catch (Exception $ex) { $this->log_service->error($ex); } return $data; }
public function getTrustedData(OpenIdRequest $request) { $data = array(); try { $ax_request = new OpenIdAXRequest($request->getMessage()); if ($ax_request->isValid()) { $attributes = $ax_request->getRequiredAttributes(); foreach ($attributes as $attr) { array_push($data, $attr); } } } catch (Exception $ex) { $this->log_service->error($ex); } return $data; }
public function __construct(OpenIdMessage $message) { parent::__construct($message); }
/** * @param OpenIdRequest $request * @return array|mixed */ public function getTrustedData(OpenIdRequest $request) { $data = array(); try { $oauth2_request = new OpenIdOAuth2Request($request->getMessage()); if ($oauth2_request->isValid()) { array_push($data, $oauth2_request->getScope()); array_push($data, $oauth2_request->getClientId()); } } catch (Exception $ex) { $this->log_service->error($ex); } return $data; }
public function __construct(OpenIdMessage $message) { parent::__construct($message); $this->attributes = array(); $this->optional_attributes = array(); }