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 Details

    • DEFAULT_CONTEXTS_REFRESH_MINUTES

      public static final int DEFAULT_CONTEXTS_REFRESH_MINUTES
      The default minimum time, in minutes, between two readings of the Contexts from the IAM.
      See Also:
  • Constructor Details

    • DefaultAuthorizationProviderFactory

      public DefaultAuthorizationProviderFactory()
  • Method Details

    • getRealmBaseURL

      public static String getRealmBaseURL(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.
      Parameters:
      endpoint - the configured endpoint
      Returns:
      the base URL of the realm
    • getOpenIDConfigurationURL

      public static String getOpenIDConfigurationURL(String endpoint)
      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:
      connect in interface org.gcube.common.security.factories.AuthorizationProviderFactory<DefaultAuthorizationProvider>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEndpoint

      public String getEndpoint()
    • setEndpoint

      public void setEndpoint(String endpoint)
    • getContextsRefreshMinutes

      public int getContextsRefreshMinutes()
    • setContextsRefreshMinutes

      public void setContextsRefreshMinutes(int contextsRefreshMinutes)