/**
  * @param exodApp $exodApp
  *
  * @return exodClientBusiness
  */
 public static function getInstance(exodApp $exodApp)
 {
     switch ($exodApp->getType()) {
         case exodApp::TYPE_BUSINESS:
             return new exodClientBusiness($exodApp);
     }
 }
 /**
  * @param exodApp $app
  *
  * @return exodAuthResponseBase
  * @throws ilCloudException
  */
 public static function getResponseInstance(exodApp $app)
 {
     switch ($app->getType()) {
         case exodApp::TYPE_BUSINESS:
             return exodAuthResponseBusiness::getInstance();
             break;
         case exodApp::TYPE_PUBLIC:
             return exodAuthResponsePublic::getInstance();
             break;
     }
     throw new ilCloudException(ilCloudException::UNKNONW_EXCEPTION, 'No App Type Found');
 }
 /**
  * @param exodBearerToken $exod_bearer_token
  * @param                 $client_id
  * @param                 $client_secret
  * @param exodTenant      $exodTenant
  */
 protected function __construct(exodBearerToken $exod_bearer_token, $client_id, $client_secret, exodTenant $exodTenant)
 {
     $this->tenant_id = $exodTenant->getTenantId();
     $this->tenant_name = $exodTenant->getTenantName();
     parent::__construct($exod_bearer_token, $client_id, $client_secret);
     // TODO: Change the autogenerated stub
 }
Example #4
0
 /**
  * @return string
  */
 protected function generateAuthUrl()
 {
     $auth_url = $this->exod_app->getAuthUrl();
     $client_id = $this->exod_app->getClientId();
     $response_type = $this->exod_app->getResponseType();
     $redirect_uri = urlencode($this->exod_app->getRedirectUri());
     return "{$auth_url}?client_id={$client_id}&response_type={$response_type}&redirect_uri={$redirect_uri}";
 }