-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GT-56: Add base class for OIDC AuthTokens, add EOSCAAI AuthToken #430
base: dev
Are you sure you want to change the base?
Conversation
9bc132c
to
f7c6a0a
Compare
- it's abstract because the idea is that it will be extended by specific, non-abstract, classes - like a token class to handle EOSC AAI.
- currently only supports aai-demo.eosc-portal.eu
f7c6a0a
to
e1c9d77
Compare
The codacy / codeclimate issues are being tackled as part of #423. |
Co-authored-by: Rowan <[email protected]>
- it was over 80 characters, which PSR12 says we should not do. - it also makes it more consistent with other lines in this file. Co-authored-by: Rowan <[email protected]>
/** | ||
* {@see IAuthentication::eraseCredentials()} | ||
*/ | ||
public function eraseCredentials() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this function and validate() function below left blank?
$_SERVER[$this->groupHeader] | ||
); | ||
|
||
$presentBadGroups = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this block of code start with a comment, like in the similar function checkRequiredGroups() above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saying something like "// Build up a list of banned groups"
null, | ||
'You do not belong to the correct group(s) ' . | ||
'to gain access to this site.<br /><br />' . $errorContext . | ||
$prependString . $groupString . '<br /><br />' . $this->helpString |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is $prependString needed here, when $groupString starts with $prependString?
$this->groupSplitChar = ','; | ||
$this->bannedGroups = array(); | ||
$this->requiredGroups = array("urn:geant:eosc-portal.eu:res:gocdb.eosc-portal.eu"); | ||
$this->helpString = 'Please seek assistance by opening a ticket against the ' . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$this->helpString = 'Please seek assistance by opening a ticket against the ' . | |
$this->helpMessage = 'Please seek assistance by opening a ticket against the ' . |
helpMessage
is probably more readable than helpString
This PR:
Rather than proliferate
die()
calls, the OIDC abstract class throws exceptions which are now handled (granted this handling then callsdie()
because it can't make use ofshow_view('error.php',...
)This code is running on gocdb-preprod.eosc-portal.eu.
Supersedes #348.