Class DefaultAuthorizationProviderFactory
java.lang.Object
org.gcube.common.security.provider.DefaultAuthorizationProviderFactory
- All Implemented Interfaces:
org.gcube.common.security.factories.AuthorizationProviderFactory<DefaultAuthorizationProvider>
public class DefaultAuthorizationProviderFactory
extends Object
implements org.gcube.common.security.factories.AuthorizationProviderFactory<DefaultAuthorizationProvider>
Default implementation of AuthorizationProviderFactory for DefaultAuthorizationProvider
- Author:
- Luca Frosini (ISTI-CNR)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default minimum time, in minutes, between two readings of the Contexts from the IAM. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnect(org.gcube.common.security.credentials.Credentials credentials) intstatic StringgetOpenIDConfigurationURL(String endpoint) Returns the OpenID Connect discovery document of the IAM realm for a configured endpoint (OpenID Connect Discovery 1.0), e.g.static StringgetRealmBaseURL(String endpoint) Returns the base URL of the IAM realm for a configured endpoint, which is either the realm base URL itself or its token endpoint.voidsetContextsRefreshMinutes(int contextsRefreshMinutes) voidsetEndpoint(String endpoint) toString()
-
Field Details
-
DEFAULT_CONTEXTS_REFRESH_MINUTES
public static final int DEFAULT_CONTEXTS_REFRESH_MINUTESThe default minimum time, in minutes, between two readings of the Contexts from the IAM.- See Also:
-
-
Constructor Details
-
DefaultAuthorizationProviderFactory
public DefaultAuthorizationProviderFactory()
-
-
Method Details
-
getRealmBaseURL
Returns the base URL of the IAM realm for a configured endpoint, which is either the realm base URL itself or its token endpoint.- Parameters:
endpoint- the configured endpoint- Returns:
- the base URL of the realm
-
getOpenIDConfigurationURL
Returns the OpenID Connect discovery document of the IAM realm for a configured endpoint (OpenID Connect Discovery 1.0), e.g.https://accounts.d4science.org/auth/realms/d4science/.well-known/openid-configuration.- Parameters:
endpoint- the configured endpoint- Returns:
- the URL of the discovery document
-
connect
public DefaultAuthorizationProvider connect(org.gcube.common.security.credentials.Credentials credentials) - Specified by:
connectin interfaceorg.gcube.common.security.factories.AuthorizationProviderFactory<DefaultAuthorizationProvider>
-
toString
-
getEndpoint
-
setEndpoint
-
getContextsRefreshMinutes
public int getContextsRefreshMinutes() -
setContextsRefreshMinutes
public void setContextsRefreshMinutes(int contextsRefreshMinutes)
-