Skip to content

Commit

Permalink
Fix indenting as identified by phpcodesniffer
Browse files Browse the repository at this point in the history
  • Loading branch information
gregcorbett committed Jul 11, 2022
1 parent e00fda2 commit c18f7d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions htdocs/PI/write/PIWriteRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,8 @@ private function checkUserAuthenticated () {
if (empty($this->userIdentifier)) {
#yes 403 - 401 is not appropriate for X.509 authentication
$this->exceptionWithResponseCode(403,
"You need to be authenticated to access this resource. " .
"Please provide a valid IGTF X.509 Certificate"
"You need to be authenticated to access this resource. " .
"Please provide a valid IGTF X.509 Certificate"
);
}
}
Expand Down
14 changes: 7 additions & 7 deletions htdocs/PI/write/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ function returnJsonWriteAPIResult ($httpResponseCode, $object) {
* @return array type of user identifier and identifier string
*/
function getAuthenticationInfo () {
require_once __DIR__ . '/../../web_portal/components/Get_User_Principle.php';
#Check if associated cert/token is set to define identifier type
if(isset($_SERVER['SSL_CLIENT_CERT'])){$identifierType = 'X.509';}
if(isset($_SERVER['OIDC_access_token'])){$identifierType = 'OIDC Subject';}
require_once __DIR__ . '/../../web_portal/components/Get_User_Principle.php';
#Check if associated cert/token is set to define identifier type
if(isset($_SERVER['SSL_CLIENT_CERT'])){$identifierType = 'X.509';}
if(isset($_SERVER['OIDC_access_token'])){$identifierType = 'OIDC Subject';}

#This will return null if no cert is presented
$identifier = Get_User_Principle_PI();
#This will return null if no cert is presented
$identifier = Get_User_Principle_PI();

return array('userIdentifier'=>$identifier,'userIdentifierType'=>$identifierType);
return array('userIdentifier'=>$identifier,'userIdentifierType'=>$identifierType);
}

0 comments on commit c18f7d6

Please sign in to comment.