Class BlueMindCredentialsConfiguration

java.lang.Object
org.exoplatform.bluemind.credentials.configuration.BlueMindCredentialsConfiguration

@Configuration @ConditionalOnClass(org.exoplatform.services.connector.credentials.ConnectorCredentialsService.class) public class BlueMindCredentialsConfiguration extends Object
The BlueMind technical-account credentials provider ("bluemind-sudo") and the sessions it spends.

Guarded by ConditionalOnClass on the platform's credentials registry, so the add-on boots on a platform without the credentials module and creates none of these beans there. Factory-method beans, so that none of them is exported to another web application: every host reaches the provider through the registry it registers into, never by injection.

The provider's settings keep the names they have always been read under, so a deployment that tuned them keeps its values: the session store's "exo.connector.credentials.bluemind.session.ttlSeconds" and "exo.connector.credentials.bluemind.session.maxSessions", and the login calls' "exo.connector.credentials.bluemind.connectTimeoutSeconds" and "exo.connector.credentials.bluemind.requestTimeoutSeconds". The login calls therefore go through a REST client of their own, on those timeouts, rather than the add-on's shared one; it keeps no session itself, the store does.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    How long a login call may take to connect, in seconds.
    static final String
    How many sessions each store keeps at once.
    static final String
    How long one login call may take, body included, in seconds.
    static final String
    How long a kept session is reused, in seconds; zero keeps nothing.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.exoplatform.bluemind.client.BlueMindSessionStorage
    blueMindCredentialsSessionStorage(int ttlSeconds, int maxSessions, int connectTimeoutSeconds, int requestTimeoutSeconds)
    The technical and target sessions the provider spends, kept in this node's memory, opened through a REST client on the provider's own timeouts.
    blueMindSudoCredentialsProvider(org.exoplatform.services.connector.credentials.ConnectorCredentialsService connectorCredentialsService, org.exoplatform.services.connector.credentials.ConnectorProviderConfigStorage connectorProviderConfigStorage, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.bluemind.client.BlueMindSessionStorage blueMindCredentialsSessionStorage)
    The provider, which registers itself into the platform's registry once built — or yields to a provider already holding its name.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • TTL_PROPERTY

      public static final String TTL_PROPERTY
      How long a kept session is reused, in seconds; zero keeps nothing.
      See Also:
    • MAX_SESSIONS_PROPERTY

      public static final String MAX_SESSIONS_PROPERTY
      How many sessions each store keeps at once.
      See Also:
    • CONNECT_TIMEOUT_PROPERTY

      public static final String CONNECT_TIMEOUT_PROPERTY
      How long a login call may take to connect, in seconds.
      See Also:
    • REQUEST_TIMEOUT_PROPERTY

      public static final String REQUEST_TIMEOUT_PROPERTY
      How long one login call may take, body included, in seconds.
      See Also:
  • Constructor Details

    • BlueMindCredentialsConfiguration

      public BlueMindCredentialsConfiguration()
  • Method Details

    • blueMindCredentialsSessionStorage

      @Bean public org.exoplatform.bluemind.client.BlueMindSessionStorage blueMindCredentialsSessionStorage(@Value("${exo.connector.credentials.bluemind.session.ttlSeconds:300}") int ttlSeconds, @Value("${exo.connector.credentials.bluemind.session.maxSessions:10000}") int maxSessions, @Value("${exo.connector.credentials.bluemind.connectTimeoutSeconds:10}") int connectTimeoutSeconds, @Value("${exo.connector.credentials.bluemind.requestTimeoutSeconds:30}") int requestTimeoutSeconds)
      The technical and target sessions the provider spends, kept in this node's memory, opened through a REST client on the provider's own timeouts.
      Parameters:
      ttlSeconds - how long a session is kept
      maxSessions - how many sessions each store keeps
      connectTimeoutSeconds - the login calls' connect timeout
      requestTimeoutSeconds - the login calls' whole-exchange timeout
      Returns:
      the store
    • blueMindSudoCredentialsProvider

      @Bean public BlueMindSudoCredentialsProvider blueMindSudoCredentialsProvider(org.exoplatform.services.connector.credentials.ConnectorCredentialsService connectorCredentialsService, org.exoplatform.services.connector.credentials.ConnectorProviderConfigStorage connectorProviderConfigStorage, org.exoplatform.services.organization.OrganizationService organizationService, org.exoplatform.bluemind.client.BlueMindSessionStorage blueMindCredentialsSessionStorage)
      The provider, which registers itself into the platform's registry once built — or yields to a provider already holding its name.
      Parameters:
      connectorCredentialsService - the platform's registry of providers
      connectorProviderConfigStorage - where each connector's configuration is stored
      organizationService - the directory
      blueMindCredentialsSessionStorage - the sessions it spends
      Returns:
      the provider