2015-05-18 19:15:58 +02:00
|
|
|
package org.gcube.common.authorization.client.proxy;
|
|
|
|
|
2015-06-04 18:49:59 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2015-07-30 17:33:48 +02:00
|
|
|
import org.gcube.common.authorization.client.exceptions.ObjectNotFound;
|
2015-05-18 19:15:58 +02:00
|
|
|
import org.gcube.common.authorization.library.AuthorizationEntry;
|
2015-06-04 18:49:59 +02:00
|
|
|
import org.gcube.common.authorization.library.BannedService;
|
2015-05-18 19:15:58 +02:00
|
|
|
|
|
|
|
public interface AuthorizationProxy {
|
|
|
|
|
2015-06-04 18:49:59 +02:00
|
|
|
String generate(String userName, List<String> roles);
|
2015-05-18 19:15:58 +02:00
|
|
|
|
2015-07-30 17:33:48 +02:00
|
|
|
AuthorizationEntry get(String token) throws ObjectNotFound;
|
2015-05-29 18:32:43 +02:00
|
|
|
|
2015-07-21 12:39:32 +02:00
|
|
|
BannedService deny(String userName, String serviceClass, String serviceName);
|
2015-05-29 18:32:43 +02:00
|
|
|
|
2015-07-21 12:39:32 +02:00
|
|
|
void allow(String userName, String serviceClass, String serviceName);
|
2015-06-04 18:49:59 +02:00
|
|
|
|
|
|
|
List<BannedService> getBannedServices(String userName);
|
2015-05-18 19:15:58 +02:00
|
|
|
}
|