Commit fbd580d8 authored by R.W.Majeed's avatar R.W.Majeed

authentication API mproved

parent 31690651
package org.aktin.dwh;
public interface Authentication extends Principal{
String getName();
* Determine whether the user has the given role assigned.
* @param role role name
* @return true if role is assigned, false otherwise
boolean hasRole(String role);
/** Determine whether this user has admin privileges.
* @return true if the user has administrative rights
boolean isAdmin();
package org.aktin.dwh; package org.aktin.dwh;
public interface Authenticator { public interface Authenticator {
Principal authenticate(String user, char[] password); Authentication authenticate(String user, char[] password);
boolean isUserInRole(Principal user, String role);
/** Determine whether a given user has admin privileges.
* @param user user
* @return true if the user has administrative rights
boolean isUserAdmin(Principal user);
} }
...@@ -53,6 +53,13 @@ public class Query { ...@@ -53,6 +53,13 @@ public class Query {
@XmlElement(required=true) @XmlElement(required=true)
public QuerySchedule schedule; public QuerySchedule schedule;
* Extension to specify export definition and query definition.
* <p>
* E.g. for native i2b2: elements {@code query_definition} and {@code result_output_list}
* from XML namespace {@code}.
* </p>
@XmlAnyElement @XmlAnyElement
public List<Element> extensions; public List<Element> extensions;
...@@ -3,7 +3,6 @@ package; ...@@ -3,7 +3,6 @@ package;
import; import;
import; import;
import; import;
import java.time.Duration;
import javax.xml.bind.JAXB; import javax.xml.bind.JAXB;
import javax.xml.parsers.ParserConfigurationException; import javax.xml.parsers.ParserConfigurationException;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment