strolch/src/ch/eitchnet/privilege/handler/SessionHandler.java

45 lines
1016 B
Java
Raw Normal View History

2010-05-20 21:36:16 +02:00
/*
* Copyright (c) 2010
*
* Robert von Burg
* eitch@eitchnet.ch
*
* All rights reserved.
*
*/
package ch.eitchnet.privilege.handler;
2010-05-24 21:21:46 +02:00
import ch.eitchnet.privilege.i18n.AccessDeniedException;
import ch.eitchnet.privilege.model.Certificate;
import ch.eitchnet.privilege.model.Restrictable;
import ch.eitchnet.privilege.model.User;
2010-05-20 21:36:16 +02:00
/**
* @author rvonburg
*
*/
2010-05-25 21:41:34 +02:00
public interface SessionHandler {
2010-05-20 21:36:16 +02:00
2010-05-24 21:21:46 +02:00
/**
* @param certificate
* @param restrictable
* @return
*
* @throws AccessDeniedException
* if the {@link Certificate} is not for a currently logged in {@link User} or if the user may not
* perform the action defined by the {@link Restrictable} implementation
*/
public boolean actionAllowed(Certificate certificate, Restrictable restrictable);
/**
* @param user
* @param password
* @return
*
* @throws AccessDeniedException
* if the user credentials are not valid
*/
public Certificate authenticate(String user, String password);
2010-05-20 21:36:16 +02:00
}