You can develop programmatic logins with JAAS, which represents the strategic application programming interfaces (API) for authentication.
Configure programmatic logins with JAAS.