Skip to content

Commit ca9e2f3

Browse files
Add keycloak auth (#703)
* Add keycloak referering to PR #6376 in parse-server * Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <[email protected]> * Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <[email protected]> * Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <[email protected]> * Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <[email protected]> * Update _includes/parse-server/third-party-auth.md Co-Authored-By: Tom Fox <[email protected]> Co-authored-by: Tom Fox <[email protected]>
1 parent 37498c6 commit ca9e2f3

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

_includes/parse-server/third-party-auth.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Parse Server supports 3rd party authentication with
99
* Instagram
1010
* Janrain Capture
1111
* Janrain Engage
12+
* Keycloak
1213
* LDAP
1314
* LinkedIn
1415
* Meetup
@@ -161,6 +162,36 @@ Google oauth supports validation of id_token's and access_token's.
161162
}
162163
```
163164

165+
### Keycloak `authData`
166+
167+
```js
168+
{
169+
"keycloak": {
170+
"access_token": "access token from keycloak JS client authentication",
171+
"id": "the id retrieved from client authentication in Keycloak",
172+
"roles": ["the roles retrieved from client authentication in Keycloak"],
173+
"groups": ["the groups retrieved from client authentication in Keycloak"]
174+
}
175+
}
176+
```
177+
178+
The authentication module will test if the authData is the same as the userinfo oauth call, by comparing the attributes.
179+
180+
Copy the JSON config file generated on Keycloak ([tutorial](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter))
181+
and paste it inside of a folder (Ex.: `auth/keycloak.json`) in your server.
182+
183+
The options passed to Parse Server:
184+
185+
```js
186+
{
187+
auth: {
188+
keycloak: {
189+
config: require(`./auth/keycloak.json`) // Required
190+
}
191+
}
192+
}
193+
```
194+
164195
### Configuring Parse Server for LDAP
165196

166197
The [LDAP](https://en.wikipedia.org/wiki/Lightweight_Directory_Access_Protocol) module can check if a

0 commit comments

Comments
 (0)