Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
fix: update client auth section in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Dara Hayes committed Jul 16, 2019
1 parent e2767d2 commit db6e1ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,14 @@ The GraphQL client should provide the following `connectionParams` when attempti

```json
{
"Authorization": "Bearer <keycloak token value>",
"clientId": "<name of the clientId assigned to the application in Keycloak>"
"Authorization": "Bearer <keycloak token value>"
}
```

The example code shows how it could be done on the client side using Apollo Client.

```js
import Keycloak from "keycloak-js"
import Keycloak from 'keycloak-js'
import { WebSocketLink } from 'apollo-link-ws'


Expand All @@ -278,12 +277,11 @@ var keycloak = Keycloak({
})

const wsLink = new WebSocketLink({
uri: `ws://localhost:5000/`,
uri: 'ws://localhost:5000/',
options: {
reconnect: true,
connectionParams: {
Authorization: keycloak.token,
clientId: 'myapp'
Authorization: `Bearer ${keycloak.token}`
}
})
```
Expand Down

0 comments on commit db6e1ba

Please sign in to comment.