- $this->lang->load('openid');
- $this->load->library('openid');
- $this->config->load('openid');
- $request_to = site_url('user/check_openid_login');
- $req = $this->config->item('openid_required');
- $opt = $this->config->item('openid_optional');
- $policy = site_url('user/openid_policy');
- $pape_policy_uris = $this->config->item('openid_papa_policies');
-
- $this->openid->set_request_to($request_to);
- $this->openid->set_trust_root(base_url());
- $this->openid->set_args(null);
- $this->openid->set_sreg(true, $req, $opt, $policy);
- if (!empty($pape_policy_uris))
- $this->openid->set_pape(true, $pape_policy_uris);
-
- // Redirection to OP site will follow.
- $this->openid->authenticate($this->input->post('openid'));