Mercurial > lada > lada-server
changeset 232:d8a3d188046f
Renamed package authentication to auth.
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/auth/Authentication.java Fri Jul 05 13:24:13 2013 +0200 @@ -0,0 +1,18 @@ +package de.intevation.lada.auth; + +import javax.ws.rs.core.HttpHeaders; + +/** + * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> + */ +public interface Authentication +{ + public boolean isAuthorizedUser(HttpHeaders headers) + throws AuthenticationException; + + public AuthenticationResponse authorizedGroups(HttpHeaders headers) + throws AuthenticationException; + + public boolean hasAccess(HttpHeaders headers, String probeId) + throws AuthenticationException; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/auth/AuthenticationException.java Fri Jul 05 13:24:13 2013 +0200 @@ -0,0 +1,10 @@ +package de.intevation.lada.auth; + +/** + * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> + */ +public class AuthenticationException +extends Exception +{ + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/auth/AuthenticationResponse.java Fri Jul 05 13:24:13 2013 +0200 @@ -0,0 +1,43 @@ +package de.intevation.lada.auth; + +import java.util.List; + +/** + * Response of an authentication module. Contains the user name, + * 'Messstellen' and 'Netzbetreiber'. + * + * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> + */ +public class AuthenticationResponse +{ + private String user; + private List<String> mst; + private List<String> netzbetreiber; + + public AuthenticationResponse() { + } + + public String getUser() { + return user; + } + + public void setUser(String user) { + this.user = user; + } + + public List<String> getMst() { + return mst; + } + + public void setMst(List<String> mst) { + this.mst = mst; + } + + public List<String> getNetzbetreiber() { + return netzbetreiber; + } + + public void setNetzbetreiber(List<String> netzbetreiber) { + this.netzbetreiber = netzbetreiber; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/java/de/intevation/lada/auth/LdapAuthentication.java Fri Jul 05 13:24:13 2013 +0200 @@ -0,0 +1,185 @@ +package de.intevation.lada.auth; + +import java.util.ArrayList; +import java.util.List; + +import javax.enterprise.context.ApplicationScoped; +import javax.enterprise.context.RequestScoped; +import javax.inject.Inject; +import javax.inject.Named; +import javax.naming.InvalidNameException; +import javax.naming.ldap.LdapName; +import javax.naming.ldap.Rdn; +import javax.persistence.EntityManager; +import javax.persistence.criteria.CriteriaBuilder; +import javax.persistence.criteria.CriteriaQuery; +import javax.persistence.criteria.Predicate; +import javax.persistence.criteria.Root; +import javax.ws.rs.core.HttpHeaders; + +import org.omg.PortableServer.LifespanPolicyOperations; + +import de.intevation.lada.data.QueryBuilder; +import de.intevation.lada.model.Auth; +import de.intevation.lada.model.LMessung; +import de.intevation.lada.model.LProbe; +import de.intevation.lada.model.LProbeInfo; + +/** + * This implementation of the authentication interface reads LDAP users + * and groups from HTTP headers and validates the groups using a database. + * + * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> + */ +@ApplicationScoped +@Named("ldapauth") +public class LdapAuthentication +implements Authentication +{ + @Inject + private EntityManager em; + + /** + * Determine if the header contains information about a valid user. + * + * @param headers The HTTP header containing LDAP user information. + */ + @Override + public boolean isAuthorizedUser(HttpHeaders headers) + throws AuthenticationException { + AuthenticationResponse auth = authorizedGroups(headers); + if (auth.getMst().isEmpty() || + auth.getNetzbetreiber().isEmpty()) { + return false; + } + return true; + } + + /** + * Synchronize LDAP user and groups with database. + * + * @param headers The HTTP header containing LDAP user information. + */ + @Override + public AuthenticationResponse authorizedGroups(HttpHeaders headers) + throws AuthenticationException { + List<String> groups = new ArrayList<String>(); + try { + LdapName ldap = extractLdapName(headers); + List<Rdn> rdns = ldap.getRdns(); + for (Rdn rdn: rdns) { + String value = (String)rdn.getValue(); + if (rdn.getType().equals("cn")) { + groups.add(value); + } + } + } + catch(InvalidNameException ine) { + throw new AuthenticationException(); + } + AuthenticationResponse response = getDatabaseAtributes(groups); + String user = extractUser(headers); + if (user == null) { + throw new AuthenticationException(); + } + response.setUser(user); + return response; + } + + /** + * Determine if the user has the permission to access a probe. + * + * @param headers The HTTP header containing LDAP user information. + * @param probeId The LProbe id. + */ + public boolean hasAccess (HttpHeaders headers, String probeId) + throws AuthenticationException { + QueryBuilder<LProbe> builder = new QueryBuilder<LProbe>(em, LProbe.class); + builder.and("probeId", probeId); + List<LProbe> probe = em.createQuery(builder.getQuery()).getResultList(); + if (probe.isEmpty()) { + return false; + } + String nbId = probe.get(0).getNetzbetreiberId(); + String mstId = probe.get(0).getMstId(); + AuthenticationResponse auth = authorizedGroups(headers); + if (auth.getNetzbetreiber().contains(nbId) && + auth.getMst().contains(mstId)) { + return true; + } + return false; + } + + + /** + * Get the user from HTTP header. + * + * @param headers The HTTP header containing user information. + * @return The user name. + */ + private String extractUser(HttpHeaders headers) { + List<String> user = headers.getRequestHeader("x-ldap-user"); + if (user == null || user.isEmpty()) { + return null; + } + return user.get(0); + } + + /** + * Extract LDAP information from HTTP header. + * + * @param headers The HTTP header containing ldap information. + * @return The Ldap object. + * @throws InvalidNameException + */ + private LdapName extractLdapName(HttpHeaders headers) throws InvalidNameException { + List<String> attributes = headers.getRequestHeader("x-ldap-groups"); + if (attributes == null ||attributes.isEmpty()) { + return new LdapName(""); + } + LdapName ldap = new LdapName(""); + String all = attributes.get(0); + String[] groups = all.split(";"); + for (int i = 0; i < groups.length; i++) { + String[] items = groups[i].trim().split(","); + for (int j = 0; j < items.length; j++) { + ldap.add(items[j]); + } + } + return ldap; + } + + /** + * Get the 'Messstellen' and 'Netzbetreiber' from database using the + * LDAP groups. + * + * @param groups List of LDAP groups. + * @return AuthenticationResponse object. + */ + private AuthenticationResponse getDatabaseAtributes(List<String> groups) { + CriteriaBuilder builder = em.getCriteriaBuilder(); + CriteriaQuery<Auth> criteria = builder.createQuery(Auth.class); + Root<Auth> member = criteria.from(Auth.class); + List<Predicate> orFilter = new ArrayList<Predicate>(); + for (String group: groups) { + orFilter.add(builder.equal(member.get("ldapGroup"), group)); + } + Predicate orf = builder.or(orFilter.toArray(new Predicate[orFilter.size()])); + criteria.where(orf); + List<Auth> result = em.createQuery(criteria).getResultList(); + List<String> mst = new ArrayList<String>(); + List<String> nb = new ArrayList<String>(); + for (Auth a: result) { + if (a.getSMessStelle() != null) { + mst.add(a.getSMessStelle().getMstId()); + } + if (a.getSNetzBetreiber() != null) { + nb.add(a.getSNetzBetreiber().getNetzbetreiberId()); + } + } + AuthenticationResponse response = new AuthenticationResponse(); + response.setMst(mst); + response.setNetzbetreiber(nb); + return response; + } +} \ No newline at end of file
--- a/src/main/java/de/intevation/lada/authentication/Authentication.java Fri Jul 05 13:23:02 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -package de.intevation.lada.authentication; - -import javax.ws.rs.core.HttpHeaders; - -/** - * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> - */ -public interface Authentication -{ - public boolean isAuthorizedUser(HttpHeaders headers) - throws AuthenticationException; - - public AuthenticationResponse authorizedGroups(HttpHeaders headers) - throws AuthenticationException; - - public boolean hasAccess(HttpHeaders headers, String probeId) - throws AuthenticationException; -}
--- a/src/main/java/de/intevation/lada/authentication/AuthenticationException.java Fri Jul 05 13:23:02 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -package de.intevation.lada.authentication; - -/** - * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> - */ -public class AuthenticationException -extends Exception -{ - -}
--- a/src/main/java/de/intevation/lada/authentication/AuthenticationResponse.java Fri Jul 05 13:23:02 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -package de.intevation.lada.authentication; - -import java.util.List; - -/** - * Response of an authentication module. Contains the user name, - * 'Messstellen' and 'Netzbetreiber'. - * - * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> - */ -public class AuthenticationResponse -{ - private String user; - private List<String> mst; - private List<String> netzbetreiber; - - public AuthenticationResponse() { - } - - public String getUser() { - return user; - } - - public void setUser(String user) { - this.user = user; - } - - public List<String> getMst() { - return mst; - } - - public void setMst(List<String> mst) { - this.mst = mst; - } - - public List<String> getNetzbetreiber() { - return netzbetreiber; - } - - public void setNetzbetreiber(List<String> netzbetreiber) { - this.netzbetreiber = netzbetreiber; - } -}
--- a/src/main/java/de/intevation/lada/authentication/LdapAuthentication.java Fri Jul 05 13:23:02 2013 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,185 +0,0 @@ -package de.intevation.lada.authentication; - -import java.util.ArrayList; -import java.util.List; - -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.context.RequestScoped; -import javax.inject.Inject; -import javax.inject.Named; -import javax.naming.InvalidNameException; -import javax.naming.ldap.LdapName; -import javax.naming.ldap.Rdn; -import javax.persistence.EntityManager; -import javax.persistence.criteria.CriteriaBuilder; -import javax.persistence.criteria.CriteriaQuery; -import javax.persistence.criteria.Predicate; -import javax.persistence.criteria.Root; -import javax.ws.rs.core.HttpHeaders; - -import org.omg.PortableServer.LifespanPolicyOperations; - -import de.intevation.lada.data.QueryBuilder; -import de.intevation.lada.model.Auth; -import de.intevation.lada.model.LMessung; -import de.intevation.lada.model.LProbe; -import de.intevation.lada.model.LProbeInfo; - -/** - * This implementation of the authentication interface reads LDAP users - * and groups from HTTP headers and validates the groups using a database. - * - * @author <a href="mailto:rrenkert@intevation.de">Raimund Renkert</a> - */ -@ApplicationScoped -@Named("ldapauth") -public class LdapAuthentication -implements Authentication -{ - @Inject - private EntityManager em; - - /** - * Determine if the header contains information about a valid user. - * - * @param headers The HTTP header containing LDAP user information. - */ - @Override - public boolean isAuthorizedUser(HttpHeaders headers) - throws AuthenticationException { - AuthenticationResponse auth = authorizedGroups(headers); - if (auth.getMst().isEmpty() || - auth.getNetzbetreiber().isEmpty()) { - return false; - } - return true; - } - - /** - * Synchronize LDAP user and groups with database. - * - * @param headers The HTTP header containing LDAP user information. - */ - @Override - public AuthenticationResponse authorizedGroups(HttpHeaders headers) - throws AuthenticationException { - List<String> groups = new ArrayList<String>(); - try { - LdapName ldap = extractLdapName(headers); - List<Rdn> rdns = ldap.getRdns(); - for (Rdn rdn: rdns) { - String value = (String)rdn.getValue(); - if (rdn.getType().equals("cn")) { - groups.add(value); - } - } - } - catch(InvalidNameException ine) { - throw new AuthenticationException(); - } - AuthenticationResponse response = getDatabaseAtributes(groups); - String user = extractUser(headers); - if (user == null) { - throw new AuthenticationException(); - } - response.setUser(user); - return response; - } - - /** - * Determine if the user has the permission to access a probe. - * - * @param headers The HTTP header containing LDAP user information. - * @param probeId The LProbe id. - */ - public boolean hasAccess (HttpHeaders headers, String probeId) - throws AuthenticationException { - QueryBuilder<LProbe> builder = new QueryBuilder<LProbe>(em, LProbe.class); - builder.and("probeId", probeId); - List<LProbe> probe = em.createQuery(builder.getQuery()).getResultList(); - if (probe.isEmpty()) { - return false; - } - String nbId = probe.get(0).getNetzbetreiberId(); - String mstId = probe.get(0).getMstId(); - AuthenticationResponse auth = authorizedGroups(headers); - if (auth.getNetzbetreiber().contains(nbId) && - auth.getMst().contains(mstId)) { - return true; - } - return false; - } - - - /** - * Get the user from HTTP header. - * - * @param headers The HTTP header containing user information. - * @return The user name. - */ - private String extractUser(HttpHeaders headers) { - List<String> user = headers.getRequestHeader("x-ldap-user"); - if (user == null || user.isEmpty()) { - return null; - } - return user.get(0); - } - - /** - * Extract LDAP information from HTTP header. - * - * @param headers The HTTP header containing ldap information. - * @return The Ldap object. - * @throws InvalidNameException - */ - private LdapName extractLdapName(HttpHeaders headers) throws InvalidNameException { - List<String> attributes = headers.getRequestHeader("x-ldap-groups"); - if (attributes == null ||attributes.isEmpty()) { - return new LdapName(""); - } - LdapName ldap = new LdapName(""); - String all = attributes.get(0); - String[] groups = all.split(";"); - for (int i = 0; i < groups.length; i++) { - String[] items = groups[i].trim().split(","); - for (int j = 0; j < items.length; j++) { - ldap.add(items[j]); - } - } - return ldap; - } - - /** - * Get the 'Messstellen' and 'Netzbetreiber' from database using the - * LDAP groups. - * - * @param groups List of LDAP groups. - * @return AuthenticationResponse object. - */ - private AuthenticationResponse getDatabaseAtributes(List<String> groups) { - CriteriaBuilder builder = em.getCriteriaBuilder(); - CriteriaQuery<Auth> criteria = builder.createQuery(Auth.class); - Root<Auth> member = criteria.from(Auth.class); - List<Predicate> orFilter = new ArrayList<Predicate>(); - for (String group: groups) { - orFilter.add(builder.equal(member.get("ldapGroup"), group)); - } - Predicate orf = builder.or(orFilter.toArray(new Predicate[orFilter.size()])); - criteria.where(orf); - List<Auth> result = em.createQuery(criteria).getResultList(); - List<String> mst = new ArrayList<String>(); - List<String> nb = new ArrayList<String>(); - for (Auth a: result) { - if (a.getSMessStelle() != null) { - mst.add(a.getSMessStelle().getMstId()); - } - if (a.getSNetzBetreiber() != null) { - nb.add(a.getSNetzBetreiber().getNetzbetreiberId()); - } - } - AuthenticationResponse response = new AuthenticationResponse(); - response.setMst(mst); - response.setNetzbetreiber(nb); - return response; - } -} \ No newline at end of file
--- a/src/main/java/de/intevation/lada/rest/LKommentarMService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LKommentarMService.java Fri Jul 05 13:24:13 2013 +0200 @@ -16,8 +16,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LKommentarM;
--- a/src/main/java/de/intevation/lada/rest/LKommentarService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LKommentarService.java Fri Jul 05 13:24:13 2013 +0200 @@ -20,8 +20,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LKommentarP;
--- a/src/main/java/de/intevation/lada/rest/LMessungService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LMessungService.java Fri Jul 05 13:24:13 2013 +0200 @@ -17,8 +17,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LMessung;
--- a/src/main/java/de/intevation/lada/rest/LMesswertService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LMesswertService.java Fri Jul 05 13:24:13 2013 +0200 @@ -17,8 +17,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LMessung;
--- a/src/main/java/de/intevation/lada/rest/LOrtService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LOrtService.java Fri Jul 05 13:24:13 2013 +0200 @@ -16,8 +16,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LOrt;
--- a/src/main/java/de/intevation/lada/rest/LProbeService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LProbeService.java Fri Jul 05 13:24:13 2013 +0200 @@ -5,7 +5,6 @@ import java.util.logging.Logger; import javax.enterprise.context.RequestScoped; -import javax.enterprise.inject.New; import javax.inject.Inject; import javax.inject.Named; import javax.ws.rs.Consumes; @@ -20,12 +19,12 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; -import de.intevation.lada.authentication.AuthenticationResponse; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; +import de.intevation.lada.auth.AuthenticationResponse; +import de.intevation.lada.auth.Authorization; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; -import de.intevation.lada.model.LMessung; import de.intevation.lada.model.LProbe; import de.intevation.lada.model.LProbeInfo; @@ -57,6 +56,10 @@ @Named("ldapauth") private Authentication authentication; + @Inject + @Named("dataauthorization") + private Authorization authorization; + /** * The logger for this class. */ @@ -82,6 +85,7 @@ authentication.authorizedGroups(header); Response response = repository.findById(LProbeInfo.class, id); + @SuppressWarnings("unchecked") List<LProbeInfo> probe = (List<LProbeInfo>)response.getData(); if (probe.isEmpty()) { return new Response(false, 601, new ArrayList<LProbeInfo>());
--- a/src/main/java/de/intevation/lada/rest/LStatusService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LStatusService.java Fri Jul 05 13:24:13 2013 +0200 @@ -16,8 +16,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LStatus;
--- a/src/main/java/de/intevation/lada/rest/LZusatzwertService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/LZusatzwertService.java Fri Jul 05 13:24:13 2013 +0200 @@ -19,8 +19,8 @@ import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.LZusatzWert;
--- a/src/main/java/de/intevation/lada/rest/OrtService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/OrtService.java Fri Jul 05 13:24:13 2013 +0200 @@ -16,8 +16,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.Ort;
--- a/src/main/java/de/intevation/lada/rest/SDatenbasisService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SDatenbasisService.java Fri Jul 05 13:24:13 2013 +0200 @@ -13,8 +13,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SDatenbasis;
--- a/src/main/java/de/intevation/lada/rest/SMessMethodeService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SMessMethodeService.java Fri Jul 05 13:24:13 2013 +0200 @@ -12,8 +12,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SMessMethode;
--- a/src/main/java/de/intevation/lada/rest/SMesseinheitService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SMesseinheitService.java Fri Jul 05 13:24:13 2013 +0200 @@ -12,8 +12,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SMessEinheit;
--- a/src/main/java/de/intevation/lada/rest/SMessgroesseService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SMessgroesseService.java Fri Jul 05 13:24:13 2013 +0200 @@ -12,8 +12,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SMessgroesse;
--- a/src/main/java/de/intevation/lada/rest/SMessstelleService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SMessstelleService.java Fri Jul 05 13:24:13 2013 +0200 @@ -13,9 +13,9 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; -import de.intevation.lada.authentication.AuthenticationResponse; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; +import de.intevation.lada.auth.AuthenticationResponse; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SMessStelle;
--- a/src/main/java/de/intevation/lada/rest/SNetzBetreiberService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SNetzBetreiberService.java Fri Jul 05 13:24:13 2013 +0200 @@ -13,9 +13,9 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; -import de.intevation.lada.authentication.AuthenticationResponse; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; +import de.intevation.lada.auth.AuthenticationResponse; import de.intevation.lada.data.QueryBuilder; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SNetzBetreiber;
--- a/src/main/java/de/intevation/lada/rest/SProbenartService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SProbenartService.java Fri Jul 05 13:24:13 2013 +0200 @@ -13,8 +13,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SProbenart;
--- a/src/main/java/de/intevation/lada/rest/SProbenzusatzService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SProbenzusatzService.java Fri Jul 05 13:24:13 2013 +0200 @@ -12,8 +12,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SProbenZusatz;
--- a/src/main/java/de/intevation/lada/rest/SStaatService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SStaatService.java Fri Jul 05 13:24:13 2013 +0200 @@ -12,8 +12,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SStaat;
--- a/src/main/java/de/intevation/lada/rest/SUmweltService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SUmweltService.java Fri Jul 05 13:24:13 2013 +0200 @@ -13,8 +13,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SUmwelt;
--- a/src/main/java/de/intevation/lada/rest/SVerwaltungseinheitService.java Fri Jul 05 13:23:02 2013 +0200 +++ b/src/main/java/de/intevation/lada/rest/SVerwaltungseinheitService.java Fri Jul 05 13:24:13 2013 +0200 @@ -12,8 +12,8 @@ import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; -import de.intevation.lada.authentication.Authentication; -import de.intevation.lada.authentication.AuthenticationException; +import de.intevation.lada.auth.Authentication; +import de.intevation.lada.auth.AuthenticationException; import de.intevation.lada.data.Repository; import de.intevation.lada.model.SVerwaltungseinheit;