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;
|
2023-02-08 16:29:45 +01:00
|
|
|
import org.gcube.common.authorization.library.endpoints.AuthorizationEndpoint;
|
|
|
|
import org.gcube.common.authorization.library.endpoints.EndpointsContainer;
|
2016-07-22 14:27:10 +02:00
|
|
|
import org.gcube.common.authorization.library.provider.UserInfo;
|
2015-05-18 19:15:58 +02:00
|
|
|
|
|
|
|
public interface AuthorizationProxy {
|
|
|
|
|
2016-06-23 18:14:16 +02:00
|
|
|
AuthorizationEndpoint getEndpoint(int infrastructureHash);
|
2015-11-27 18:06:28 +01:00
|
|
|
|
2016-09-22 10:44:15 +02:00
|
|
|
void setEndpoint(EndpointsContainer endpoints);
|
2016-01-22 17:28:17 +01:00
|
|
|
|
2015-11-24 19:26:37 +01:00
|
|
|
AuthorizationEntry get(String token) throws ObjectNotFound, Exception;
|
2019-12-09 17:55:30 +01:00
|
|
|
|
|
|
|
List<AuthorizationEntry> get(List<String> tokens) throws ObjectNotFound, Exception;
|
2016-07-22 14:27:10 +02:00
|
|
|
|
|
|
|
String generateUserToken(UserInfo client, String context)
|
|
|
|
throws Exception;
|
|
|
|
|
2016-11-14 17:39:00 +01:00
|
|
|
String resolveTokenByUserAndContext(String user, String context)
|
|
|
|
throws Exception;
|
|
|
|
|
2018-02-22 18:13:45 +01:00
|
|
|
void removeAllReleatedToken(String clientId, String context) throws Exception;
|
2019-10-07 09:19:54 +02:00
|
|
|
|
|
|
|
void setTokenRoles(String token, List<String> roles) throws Exception;
|
2016-07-14 17:47:45 +02:00
|
|
|
|
2015-05-18 19:15:58 +02:00
|
|
|
}
|