public function authorizeFinish ( $authorized, $user_id )
	{
		OAuthRequestLogger::start($this);

		$token = $this->getParam('oauth_token', true);
		$verifier = null;
		if ($this->session->get('verify_oauth_token') == $token)
		{
			// Flag the token as authorized, or remove the token when not authorized
			$store = OAuthStore::instance();

			// Fetch the referrer host from the oauth callback parameter
			$referrer_host  = '';
			$oauth_callback = false;
			$verify_oauth_callback = $this->session->get('verify_oauth_callback');
			if (!empty($verify_oauth_callback) && $verify_oauth_callback != 'oob') // OUT OF BAND
			{
				$oauth_callback = $this->session->get('verify_oauth_callback');
				$ps = parse_url($oauth_callback);
				if (isset($ps['host']))
				{
					$referrer_host = $ps['host'];
				}
			}
			
			if ($authorized)
			{
				OAuthRequestLogger::addNote('Authorized token "'.$token.'" for user '.$user_id.' with referrer "'.$referrer_host.'"');
 				// 1.0a Compatibility : create a verifier code
				$verifier = $store->authorizeConsumerRequestToken($token, $user_id, $referrer_host);
			}
			else
			{
				OAuthRequestLogger::addNote('Authorization rejected for token "'.$token.'" for user '.$user_id."\nToken has been deleted");
				$store->deleteConsumerRequestToken($token);
			}
			
			if (!empty($oauth_callback))
			{
 				$params = array('oauth_token' => rawurlencode($token));
 				// 1.0a Compatibility : if verifier code has been generated, add it to the URL
 				if ($verifier) {
 					$params['oauth_verifier'] = $verifier;
 				}
 				
				$uri = preg_replace('/\s/', '%20', $oauth_callback);
				if (!empty($this->allowed_uri_schemes)) 
				{
					if (!in_array(substr($uri, 0, strpos($uri, '://')), $this->allowed_uri_schemes)) 
					{
						throw new OAuthException2('Illegal protocol in redirect uri '.$uri);
					}
				} 
				else if (!empty($this->disallowed_uri_schemes)) 
				{
					if (in_array(substr($uri, 0, strpos($uri, '://')), $this->disallowed_uri_schemes))
					{
						throw new OAuthException2('Illegal protocol in redirect uri '.$uri);
					}
				}

 				$this->redirect($oauth_callback, $params);
			}
		}
		OAuthRequestLogger::flush();
		return $verifier;
	}