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

authentication API mproved

parent 31690651
package org.aktin.dwh;
import java.security.Principal;
public interface Authentication extends Principal{
@Override
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;
import java.security.Principal;
public interface Authenticator {
Principal 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);
Authentication authenticate(String user, char[] password);
}
......@@ -53,6 +53,13 @@ public class Query {
@XmlElement(required=true)
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 http://www.i2b2.org/xsd/cell/crc/psm/1.1/}.
* </p>
*/
@XmlAnyElement
public List<Element> extensions;
......
......@@ -3,7 +3,6 @@ package org.aktin.exchange;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.time.Duration;
import javax.xml.bind.JAXB;
import javax.xml.parsers.ParserConfigurationException;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment