For this issue, we need to configure the backend server to be able to connect to the keycloak through the keycloak clients. Keycloak Client is just an application that is registered to keycloak. We will have a client called "cap_teacher" and "cap_student" applications. We can connect to the keycloak via a client. Clients will have certain privileges. Clients can be treated as a keycloak portal.
So to simplify this issue:
The backend should be configured to connect to the keycloak auth server. And can connect through multiple portals (student or teacher). They can be 1 portal, and it is a matter of choice for now since we don't have a foreseen vision for keycloak.
The Keycloak should have 2 set of users (Admins/teachers and Students/pupils).
the cap_teacher will accept only teacher connections and credentials. The cap_teacher secret (credential will be saved internally in an environment variable as well as the cap_student).
You can connect to a client by using the "basic" token or the "OAUTH2" bearer tokens.
Open an api endpoint to test the backend<-> keycloak connection.
For this issue, we need to configure the backend server to be able to connect to the keycloak through the keycloak clients. Keycloak Client is just an application that is registered to keycloak. We will have a client called "cap_teacher" and "cap_student" applications. We can connect to the keycloak via a client. Clients will have certain privileges. Clients can be treated as a keycloak portal. So to simplify this issue: