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:
parent
6fcfaa6008
commit
318b84e8a5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue