Skip to content

Commit af6c6a3

Browse files
author
Marat Akhmetov
committed
[DOP-29537] added documentation for OAuth2GatewayProvider
1 parent 7148408 commit af6c6a3

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

docs/reference/server/auth/keycloak/index.rst

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,27 @@ Basic configuration
8181
.. autopydantic_model:: syncmaster.server.settings.auth.keycloak.KeycloakSettings
8282
.. autopydantic_model:: syncmaster.server.settings.auth.jwt.JWTSettings
8383

84+
85+
OAuth2 Gateway Provider
86+
-----------
87+
In case of using an OAuth2 Gateway, all API requests will come with an Authorization: Bearer header. For this scenario, Syncmaster provides an alternative authentication provider called OAuth2GatewayProvider. This provider works as follows:
88+
89+
- It extracts the access token from the Authorization header.
90+
- It inspects the token in Keycloak.
91+
- It searches for the user in the Syncmaster database and creates it if not found.
92+
93+
This provider ensures integration with OAuth2 Gateway and maintains the standard authorization flow as described in the Keycloak Auth Provider section. It also uses the `python-keycloak <https://pypi.org/project/python-keycloak/>`_ library for interactions with the Keycloak server and handles the token exchange process similarly.
94+
95+
**Configuration**
96+
97+
OAuth2GatewayProvider uses the same configuration models as KeycloakAuthProvider — namely:
98+
99+
.. autopydantic_model:: syncmaster.server.settings.auth.oauth2_gateway.OAuth2GatewayProviderSettings
100+
.. autopydantic_model:: syncmaster.server.settings.auth.keycloak.KeycloakSettings
101+
84102
.. toctree::
85103
:maxdepth: 1
86104
:caption: Keycloak
87105
:hidden:
88106

89-
local_installation
107+
local_installation

0 commit comments

Comments
 (0)