Using the JAAS login framework, you can create a JAAS login configuration that can be used to perform login to an identity assertion.
Configure programmatic logins with JAAS.
Configure a server-side JAAS authentication and login configuration.