Class SecurityHub

java.lang.Object
edu.suffolk.litlab.efspserver.services.SecurityHub

public class SecurityHub extends Object
Language might be loose, but we try to use "Key" as a permanent string (keep it secret!) that you use to authenticate with some system. Kinda like a username and password, but combined as one piece of info, not two.

"Token" on the other hand, holds the same purpose, but is ephemeral, and not intended to be saved for a long time. The login token is generated when the server receives an api key, and the client should use the token for subsequent logins, not the key.

Author:
litlab
  • Constructor Details

    • SecurityHub

      public SecurityHub(DataSource userDs, Optional<String> env, List<String> jurisdictions)
      Parameters:
      userDs - Gives connections to the user SQL table
      env - the running environment, i.e. which Tyler instance to connect to, "stage" vs "prod"
      jurisdictions - a list of Tyler jurisdictions to connect to. See SoapClientChooser.
  • Method Details

    • login

      public Optional<NewTokens> login(String apiKey, String jsonLoginInfo)
      Actually completes the REST client's login to the server. Completes each login to the EFMFiling Interfaces separately.
      Parameters:
      apiKey - The api key that the server can use for logging in
      jsonLoginInfo - The JSON string with login info for whatever modules it's wants to login to
      Returns:
      A map of expected Headers that subsequent calls should have to their expected values. For example, TYLER-TOKEN will have the provided Tyler email + ":" + password Hash, used to authenticate the user.