Beispiel #1
0
 /**
  * @param $inputs
  * @return string
  */
 private function getRequestMode($inputs)
 {
     $grantType = ProxyAux::getQueryValue($inputs, ProxyAux::GRANT_TYPE);
     $skip = ProxyAux::getQueryValue($inputs, $this->skipParam);
     $revoke = ProxyAux::getQueryValue($inputs, $this->revokeParam);
     $mode = ProxyAux::MODE_TOKEN;
     if (isset($grantType)) {
         if ($grantType === ProxyAux::PASSWORD_GRANT || $grantType === ProxyAux::CLIENT_CREDENTIALS_GRANT) {
             $mode = ProxyAux::MODE_LOGIN;
         }
     } else {
         if (isset($skip) && strtolower($skip) === 'true') {
             $mode = ProxyAux::MODE_SKIP;
         } else {
             if (isset($revoke) && strtolower($revoke) === 'true') {
                 $mode = ProxyAux::MODE_REVOKE;
             }
         }
     }
     return $mode;
 }
Beispiel #2
0
 /**
  * @param $inputs
  * @return string
  */
 private function getRequestMode($inputs)
 {
     $grantType = ProxyAux::getQueryValue($inputs, ProxyAux::GRANT_TYPE);
     $skip = ProxyAux::getQueryValue($inputs, $this->skipParam);
     $mode = ProxyAux::MODE_TOKEN;
     if (isset($grantType)) {
         if ($grantType === ProxyAux::PASSWORD_GRANT) {
             $mode = ProxyAux::MODE_LOGIN;
         } else {
             if ($grantType === ProxyAux::GUEST_GRANT) {
                 // add new grant type
                 $mode = ProxyAux::MODE_LOGIN;
             }
         }
     } else {
         if (isset($skip) && strtolower($skip) === 'true') {
             $mode = ProxyAux::MODE_SKIP;
         }
     }
     return $mode;
 }
 /**
  * @param $inputs
  * @return array
  */
 private function removeTokenExtraParams($inputs)
 {
     $inputs = ProxyAux::removeQueryValue($inputs, ProxyAux::ACCESS_TOKEN);
     return $inputs;
 }