Authorization

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-access/gcube-geoserver-connector@148465 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
pasquale.vitale 2017-05-11 08:46:59 +00:00
parent 6fcfaa6008
commit 318b84e8a5
1 changed files with 7 additions and 7 deletions

View File

@ -13,7 +13,7 @@ import org.slf4j.LoggerFactory;
public class AuthenticationRequest extends HttpServletRequestWrapper {
private final static String AUTHENTICATION = "Authentication";
private final static String AUTHORIZATION = "Authorization";
private Logger logger;
public AuthenticationRequest(HttpServletRequest request) {
@ -27,9 +27,9 @@ public class AuthenticationRequest extends HttpServletRequestWrapper {
HttpServletRequest request = (HttpServletRequest) getRequest();
// if header name request is "Authorization" then update value
if (AUTHENTICATION.equals(name)) {
// TODO get authorization from IS
this.logger.debug("Set AUTHENTICATION");
if (AUTHORIZATION.equals(name)) {
// TODO get Authorization from IS
this.logger.debug("Set AUTHORIZATION");
return "BASIC YWRtaW46Z2Vvc2VydmVy";
}
@ -51,9 +51,9 @@ public class AuthenticationRequest extends HttpServletRequestWrapper {
list.add(n);
}
// add Authentication
list.add(AUTHENTICATION);
this.logger.debug("add Authentication");
// add Authorization
list.add(AUTHORIZATION);
this.logger.debug("add Authorization");
// create an enumeration from the list and return
Enumeration<String> en = Collections.enumeration(list);
return en;