Class SecurityHub
java.lang.Object
edu.suffolk.litlab.efsp.server.auth.SecurityHub
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 Summary
ConstructorsConstructorDescriptionSecurityHub(Supplier<LoginDatabase> ldSupplier, Optional<TylerEnv> env, List<Jurisdiction> jurisdictions) -
Method Summary
-
Constructor Details
-
SecurityHub
public SecurityHub(Supplier<LoginDatabase> ldSupplier, Optional<TylerEnv> env, List<Jurisdiction> jurisdictions) - Parameters:
ldSupplier- Gives connections to the login-related SQL tablesenv- 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
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 inloginInfo- The JSON object with login info for whatever modules it's wants to login to- Returns:
- If the optional is empty, the apikey or one of the attempted logins failed. If not empty, it contains the new API Tokens that the REST client should now send to the Server, or an empty token list (which happens when querying Tyler code endpoints before the user is logged in). For example, TYLER-TOKEN will have the provided Tyler email + ":" + password Hash, used to authenticate the user.
-