You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2021/05/17 14:25:40 UTC
[sling-org-apache-sling-auth-core] 01/03: SLING-10383 - Do not
check for redirect loops when a login fails due to an expired token
This is an automated email from the ASF dual-hosted git repository.
rombert pushed a commit to branch feature/SLING-10383
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-auth-core.git
commit 06e533ff0405829f53c8601310648838445af403
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Mon May 17 16:15:12 2021 +0200
SLING-10383 - Do not check for redirect loops when a login fails due to an expired token
Minor code cleanups
---
.../java/org/apache/sling/auth/core/impl/SlingAuthenticator.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java b/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
index d075e61..e7143b1 100644
--- a/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
+++ b/src/main/java/org/apache/sling/auth/core/impl/SlingAuthenticator.java
@@ -370,7 +370,7 @@ public class SlingAuthenticator implements Authenticator,
/**
* Get the configuration for the http auth
* @param config The configuration
- * @return The http auth
+ * @return The http auth
*/
public static String getHttpAuth(final Config config) {
final String http;
@@ -1177,7 +1177,7 @@ public class SlingAuthenticator implements Authenticator,
* and who is now impersonating as <i>user</i>.
*/
private void sendSudoCookie(
- HttpServletRequest request,
+ HttpServletRequest request,
HttpServletResponse response,
final String user, final int maxAge, final String path,
final String owner) {
@@ -1405,7 +1405,7 @@ public class SlingAuthenticator implements Authenticator,
}
private void postLoginEvent(final AuthenticationInfo authInfo) {
- final Dictionary<String, Object> properties = new Hashtable<String, Object>();
+ final Dictionary<String, Object> properties = new Hashtable<>();
properties.put(SlingConstants.PROPERTY_USERID, authInfo.getUser());
properties.put(AuthenticationInfo.AUTH_TYPE, authInfo.getAuthType());
@@ -1424,7 +1424,7 @@ public class SlingAuthenticator implements Authenticator,
AuthenticationHandler.FAILURE_REASON_CODES reason_code = getFailureReasonFromException(authInfo, reason);
//if reason_code is null, it is problem some non-login related failure, so don't send the event
if (reason_code != null) {
- final Dictionary<String, Object> properties = new Hashtable<String, Object>();
+ final Dictionary<String, Object> properties = new Hashtable<>();
if (authInfo.getUser() != null) {
properties.put(SlingConstants.PROPERTY_USERID, authInfo.getUser());
}