/** * @param array $options * @param Service_OpenSocial_Container $container */ public function authorize_request(Net_HTTP_Request $request, Service_OpenSocial_Container $container) { return $request->query_parameters(array($this->options['st_name'] => $this->options['st_value'])); }
/** * @param Net_HTTP_Response $response * @param Net_HTTP_Request $request * @param int $id */ protected function redirect($response, $request, $effective_url) { $last_url = parse_url($effective_url); $next_url = parse_url(trim($response->headers['Location'])); if (!$last_url || !$next_url) { return $response; } $last_url = array('scheme' => $last_url['scheme'], 'host' => $last_url['host']); $go_url = array_merge($last_url, $next_url); $request->scheme($go_url['scheme'])->host($go_url['host'])->path(isset($go_url['path']) ? $go_url['path'] : null)->query(isset($go_url['query']) ? $go_url['query'] : null); return $this->send($request); }