mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 03:23:13 +00:00
Requested changes
- only warn about failure to find a matching ePerson if canSelfRegister is false - tell LGTMbot everything is fine with the redirect - remove comments about nonexistent ORCID login code
This commit is contained in:
@@ -137,8 +137,12 @@ public class OidcAuthenticationBean implements AuthenticationMethod {
|
|||||||
return ePerson.canLogIn() ? logInEPerson(context, ePerson) : BAD_ARGS;
|
return ePerson.canLogIn() ? logInEPerson(context, ePerson) : BAD_ARGS;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOGGER.warn("Self registration is currently disabled for OIDC, and no ePerson could be found for email: {}",
|
// if self registration is disabled, warn about this failure to find a matching eperson
|
||||||
email);
|
if (! canSelfRegister()) {
|
||||||
|
LOGGER.warn("Self registration is currently disabled for OIDC, and no ePerson could be found for email: {}",
|
||||||
|
email);
|
||||||
|
}
|
||||||
|
|
||||||
return canSelfRegister() ? registerNewEPerson(context, userInfo, email) : NO_SUCH_USER;
|
return canSelfRegister() ? registerNewEPerson(context, userInfo, email) : NO_SUCH_USER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ public class OidcRestController {
|
|||||||
|
|
||||||
if (StringUtils.equalsAnyIgnoreCase(redirectHostName, allowedHostNames.toArray(new String[0]))) {
|
if (StringUtils.equalsAnyIgnoreCase(redirectHostName, allowedHostNames.toArray(new String[0]))) {
|
||||||
log.debug("OIDC redirecting to " + redirectUrl);
|
log.debug("OIDC redirecting to " + redirectUrl);
|
||||||
response.sendRedirect(redirectUrl);
|
response.sendRedirect(redirectUrl); // lgtm [java/unvalidated-url-redirection]
|
||||||
} else {
|
} else {
|
||||||
log.error("Invalid OIDC redirectURL=" + redirectUrl +
|
log.error("Invalid OIDC redirectURL=" + redirectUrl +
|
||||||
". URL doesn't match hostname of server or UI!");
|
". URL doesn't match hostname of server or UI!");
|
||||||
|
@@ -24,9 +24,6 @@
|
|||||||
# * X.509 Certificate Authentication
|
# * X.509 Certificate Authentication
|
||||||
# Plugin class: org.dspace.authenticate.X509Authentication
|
# Plugin class: org.dspace.authenticate.X509Authentication
|
||||||
# Configuration file: authentication-x509.cfg
|
# Configuration file: authentication-x509.cfg
|
||||||
# * ORCID Authentication
|
|
||||||
# Plugin class: org.dspace.authenticate.OrcidAuthentication
|
|
||||||
# Configuration file: authentication-orcid.cfg
|
|
||||||
# * OIDC Authentication
|
# * OIDC Authentication
|
||||||
# Plugin class: org.dspace.authenticate.OidcAuthentication
|
# Plugin class: org.dspace.authenticate.OidcAuthentication
|
||||||
# Configuration file: authentication-oidc.cfg
|
# Configuration file: authentication-oidc.cfg
|
||||||
@@ -52,9 +49,6 @@
|
|||||||
# X.509 certificate authentication. See authentication-x509.cfg for default configuration.
|
# X.509 certificate authentication. See authentication-x509.cfg for default configuration.
|
||||||
#plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.X509Authentication
|
#plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.X509Authentication
|
||||||
|
|
||||||
# ORCID authentication. See authentication-orcid.cfg for default configuration.
|
|
||||||
#plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.OrcidAuthentication
|
|
||||||
|
|
||||||
# OIDC authentication. See authentication-oidc.cfg for default configuration.
|
# OIDC authentication. See authentication-oidc.cfg for default configuration.
|
||||||
#plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.OidcAuthentication
|
#plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.OidcAuthentication
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user