Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keycloak auth #703

Merged
merged 6 commits into from
Nov 2, 2020
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions _includes/parse-server/third-party-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Parse Server supports 3rd party authentication with
* Instagram
* Janrain Capture
* Janrain Engage
* Keycloak
* LDAP
* LinkedIn
* Meetup
Expand Down Expand Up @@ -189,6 +190,36 @@ Google oauth supports validation of id_token's and access_token's.
}
```

### Keycloak `authData`

```js
{
"keycloak": {
"access_token": "access token from keycloak JS client authentication",
"id": "the id retrieved from client authentication in Keycloak",
"roles": ["the roles retrieved from client authentication in Keycloak"],
"groups": ["the groups retrieved from client authentication in Keycloak"]
}
}
```

The authentication module will test if the authData is the same as the userinfo oauth call, by comparing the attributes.

Copy the JSON config file generated on Keycloak ([how-to link](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter))
rhuanbarreto marked this conversation as resolved.
Show resolved Hide resolved
and paste it inside of a folder (Ex.: `auth/keycloak.json`) in your server.

The options passed to Parse Server:

```js
{
auth: {
keycloak: {
config: require(`./auth/keycloak.json`) // Required
}
}
}
```

### Configuring Parse Server for LDAP

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