How to define 3 authentication ways config - httpBasic, userDetailsService, JsonLoginFilter()

I'm creating an app where a user can authenticate using three ways httpBasic, userDetailsService, JsonLoginFilter().
A user should be authenticated using Spring's default /login path. But the type is one of three:
httpBasic:
There must be 2 users in memory database for testing. Simple user with user role and admin user with its role.

userDetailsService:
User and Role entities are read or saved to MySQL database. Authentication is possible when using UserDetailsService implementation bean.

JsonLoginFilter():
A user sends a request body but not as x-www-form-urlencoded or form-data. The body is raw JSON consisting of a pair <key>: <value> entries. Username and password. And JsonLoginFilter() is the filter that intercepts it.

This is my configuration:
Was this page helpful?