Interface ProvidesConfigurableRefresh

    • Method Detail

      • refreshAndGetSecurityTokenIfExpiringWithin

        String refreshAndGetSecurityTokenIfExpiringWithin​(Duration time)
        Gets a security token from the federation endpoint if the security token expires within the provided duration.

        This will always retrieve a new token from the federation endpoint and does not use a cached token.

        Parameters:
        time - the duration to check
        Returns:
        A security token that can be used to authenticate requests.
      • refreshAndGetSecurityTokenIfExpiringWithin

        String refreshAndGetSecurityTokenIfExpiringWithin​(Duration time,
                                                          boolean refreshKeys)
        Gets a security token from the federation endpoint if the security token expires within the provided duration and allows to enable/disable refresh of keys.

        This will always retrieve a new token from the federation endpoint and does not use a cached token.

        Parameters:
        time - the duration to check
        refreshKeys - boolean value to enable/disable refresh of keys
        Returns:
        A security token that can be used to authenticate requests.