added factories
This commit is contained in:
parent
4da184a5f8
commit
655e90a175
|
@ -0,0 +1,17 @@
|
||||||
|
package org.gcube.common.security.factories;
|
||||||
|
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.gcube.common.security.credentials.Credentials;
|
||||||
|
import org.gcube.common.security.secrets.Secret;
|
||||||
|
|
||||||
|
public interface AuthorizationProvider {
|
||||||
|
|
||||||
|
Set<String> getContexts();
|
||||||
|
|
||||||
|
Secret getSecretForContext(String context);
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
Credentials getCredentials();
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package org.gcube.common.security.factories;
|
||||||
|
|
||||||
|
import org.gcube.common.security.credentials.Credentials;
|
||||||
|
|
||||||
|
public interface AuthorizationProviderFactory<T extends AuthorizationProvider> {
|
||||||
|
|
||||||
|
T connect(Credentials credentials);
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue