コード例 #1
0
 /**
  *
  * @param unknown $hostname        	
  * @param unknown $response        	
  */
 public function populateConfiguration($hostname)
 {
     $response = parent::populateConfiguration($hostname);
     $this->logger->debug(sprintf('populateConfigurationFromRecommendation for hostname %s', $hostname));
     $scribe = $this->createScribe($hostname);
     // checks to see if the host is an IP address and sticks the result in the response
     // IP addresses are not allowed in the Redirect URL
     $urlParts = parse_url($scribe->getCallbackUrl());
     $response['dot_notation_url'] = false;
     if (isset($urlParts['host'])) {
         if (PostmanUtils::isHostAddressNotADomainName($urlParts['host'])) {
             $response['dot_notation_url'] = true;
         }
     }
     $response['redirect_url'] = $scribe->getCallbackUrl();
     $response['callback_domain'] = $scribe->getCallbackDomain();
     $response['help_text'] = $scribe->getOAuthHelp();
     $response['client_id_label'] = $scribe->getClientIdLabel();
     $response['client_secret_label'] = $scribe->getClientSecretLabel();
     $response['redirect_url_label'] = $scribe->getCallbackUrlLabel();
     $response['callback_domain_label'] = $scribe->getCallbackDomainLabel();
     return $response;
 }
コード例 #2
0
 /**
  *
  * @param unknown $hostname        	
  * @param unknown $response        	
  */
 public function populateConfiguration($hostname)
 {
     $response = parent::populateConfiguration($hostname);
     return $response;
 }