We are migrating older authentication to using bearer_token.
The current setup is using
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>my-app-domain</realm-name>
</login-config>
The newer one is:
<login-config>
<auth-method>BEARER_TOKEN</auth-method>
<realm-name>oauth2-cognito-realm</realm-name>
</login-config>
To avoid breaking existing client, we would like to allow both authentication methods to co-exists, and be utilized. Since web.xml allows only one <login-config>, I started looking for ways to accomplish this through elytron components.
My understanding, http-authentication-factory allows configuring
"Mechanism Configurations". The question is how to associate the realm with the auth-method?
I am not sure how others deal with this but I feel a bit lost.
I highly appreciate an advice.