changeset 292:49d0becf3c65

New method to get user name in authentication module.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 14 Aug 2013 16:10:05 +0200
parents 1a01e1473dc7
children 7c268f742553
files src/main/java/de/intevation/lada/auth/Authentication.java src/main/java/de/intevation/lada/auth/LdapAuthentication.java
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/auth/Authentication.java	Wed Aug 14 13:27:26 2013 +0200
+++ b/src/main/java/de/intevation/lada/auth/Authentication.java	Wed Aug 14 16:10:05 2013 +0200
@@ -15,4 +15,7 @@
 
     public boolean hasAccess(HttpHeaders headers, String probeId)
     throws AuthenticationException;
+
+    public String getUserName(HttpHeaders headers)
+    throws AuthenticationException;
 }
--- a/src/main/java/de/intevation/lada/auth/LdapAuthentication.java	Wed Aug 14 13:27:26 2013 +0200
+++ b/src/main/java/de/intevation/lada/auth/LdapAuthentication.java	Wed Aug 14 16:10:05 2013 +0200
@@ -177,4 +177,14 @@
         response.setNetzbetreiber(nb);
         return response;
     }
+
+    /**
+     * Returns the username specified in the header.
+     * 
+     * @param headers   The HTTP header.
+     */
+    public String getUserName(HttpHeaders headers)
+    throws AuthenticationException {
+        return extractUser(headers);
+    }
 }
\ No newline at end of file
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)