fix format
This commit is contained in:
@@ -3,7 +3,7 @@ package org.maxkey.authn.support.basic;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.maxkey.constants.LOGINTYPE;
|
||||
import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.util.AuthorizationHeaderUtils;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
@@ -99,7 +99,7 @@ public class BasicEntryPoint extends HandlerInterceptorAdapter {
|
||||
}
|
||||
|
||||
if(!isAuthenticated){
|
||||
if(WebContext.setAuthentication(username,LOGINTYPE.BASIC,"","","success")){
|
||||
if(WebContext.setAuthentication(username,ConstantsLoginType.BASIC,"","","success")){
|
||||
_logger.info("Authentication "+username+" successful .");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.maxkey.authn.support.httpheader;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.maxkey.constants.LOGINTYPE;
|
||||
import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -86,7 +86,7 @@ public class HttpHeaderEntryPoint extends HandlerInterceptorAdapter {
|
||||
}
|
||||
|
||||
if(!isAuthenticated){
|
||||
if(WebContext.setAuthentication(httpHeaderUsername,LOGINTYPE.HTTPHEADER,"","","success")){
|
||||
if(WebContext.setAuthentication(httpHeaderUsername,ConstantsLoginType.HTTPHEADER,"","","success")){
|
||||
_logger.info("Authentication "+httpHeaderUsername+" successful .");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.maxkey.constants.LOGINTYPE;
|
||||
import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.crypto.ReciprocalUtils;
|
||||
import org.maxkey.util.DateUtils;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
@@ -37,7 +37,7 @@ public class RemoteKerberosService implements KerberosService{
|
||||
DateTime notOnOrAfter=DateUtils.toUtcDate(kerberosToken.getNotOnOrAfter());
|
||||
_logger.debug("Kerberos Token is After Now "+notOnOrAfter.isAfterNow());
|
||||
if(notOnOrAfter.isAfterNow()){
|
||||
return WebContext.setAuthentication(kerberosToken.getPrincipal(),LOGINTYPE.KERBEROS,kerberosUserDomain,"","success");
|
||||
return WebContext.setAuthentication(kerberosToken.getPrincipal(),ConstantsLoginType.KERBEROS,kerberosUserDomain,"","success");
|
||||
}else{
|
||||
|
||||
return false;
|
||||
|
||||
@@ -7,7 +7,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.maxkey.authn.realm.AbstractAuthenticationRealm;
|
||||
import org.maxkey.authn.support.socialsignon.service.SocialSignOnUserToken;
|
||||
import org.maxkey.constants.LOGINTYPE;
|
||||
import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -138,7 +138,7 @@ public class SocialSignOnEndpoint extends AbstractSocialSignOnEndpoint{
|
||||
|
||||
_logger.debug("Social Sign On from "+socialSignOnUserToken.getProvider()+" mapping to user "+socialSignOnUserToken.getUsername());
|
||||
|
||||
if(WebContext.setAuthentication(socialSignOnUserToken.getUsername(), LOGINTYPE.SOCIALSIGNON,this.socialSignOnProvider.getProviderName(),"xe00000004","success")){
|
||||
if(WebContext.setAuthentication(socialSignOnUserToken.getUsername(), ConstantsLoginType.SOCIALSIGNON,this.socialSignOnProvider.getProviderName(),"xe00000004","success")){
|
||||
//socialSignOnUserToken.setAccessToken(JsonUtils.object2Json(this.accessToken));
|
||||
socialSignOnUserToken.setSocialUserInfo(accountJsonString);
|
||||
//socialSignOnUserToken.setExAttribute(JsonUtils.object2Json(accessToken.getResponseObject()));
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.maxkey.authn.support.wsfederation;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.maxkey.constants.LOGINTYPE;
|
||||
import org.maxkey.constants.ConstantsLoginType;
|
||||
import org.maxkey.util.StringUtils;
|
||||
import org.maxkey.web.WebContext;
|
||||
import org.opensaml.saml1.core.impl.AssertionImpl;
|
||||
@@ -42,7 +42,7 @@ public class WsFederationServiceImpl implements WsFederationService{
|
||||
|
||||
return WebContext.setAuthentication(
|
||||
wsFederationCredential.getAttributes().get("").toString(),
|
||||
LOGINTYPE.WSFEDERATION,
|
||||
ConstantsLoginType.WSFEDERATION,
|
||||
"","","success");
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user