title: How to access a REST API that is protected by a mod_auth_openidc proxy from Java?
body: <p>Our ticket system server is protected by an Apache proxy with mod_auth_openidc (configured for OpenID connect), using Auth0 to manage the users. This works well when accessing the ticket system from a web browser: The user gets shown the login page of Auth0 in his browser, and after logging in is redirected to the correct ticket system website. Now, I want to additionally access the REST API of the ticket system from a Java program. My REST client is not prepared to handle the HTML with the login page, and I would like to avoid having to call a browser from Java to handle the login and somehow steal the session cookie from it. <strong>Instead, I would like the user to be able to enter his credentials in normal Java fat client text fields and provide them in a way that mod_auth_openidc skips the HTML login page and directly provides the JSON from the REST API. How can my program provide the user's credentials to the proxy in such a way?</strong> Do I need to change something in the server's configuration? Do you have any hints on where I should look in the jungle of auth standards and libraries?</p>