Skip to content

Commit

Permalink
Remove references to application specific client scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeckem committed May 23, 2024
1 parent facfd24 commit 7439464
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/packages/authentication-keycloak/KeycloakAuthPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ const DEFAULT_AUTO_REFRESH_OPT = {

const DEFAULT_INIT_OPT = {
onLoad: "check-sso",
pkceMethod: "S256",
scope: "data:read"
pkceMethod: "S256"
};

export function getKeycloakConfig(properties: Partial<KeycloakProperties>): KeycloakOptions {
Expand Down
12 changes: 6 additions & 6 deletions src/packages/authentication-keycloak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ export function AppUI() {
To configure the `authentication-keycloak` package, adjust these properties.
For more details on the configuration properties, please visit the official documentation [API Reference](https://www.keycloak.org/docs/latest/securing_apps/index.html#api-reference).

| Property | Type | Description | Default |
| ------------------- | :-----------------: | --------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------: |
| refreshOptions | RefreshOptions | Configure token refresh behavior and manage access token lifecycle in client applications. | `{autoRefresh: true, interval: 6000, timeLeft: 70}` |
| keycloakInitOptions | KeycloakInitOptions | Configure Keycloak's behavior during client application initialization. | `{onLoad: "check-sso", pkceMethod: "S256", scope: "data:read"}` |
| keycloakConfig | KeycloakConfig | The configuration settings required to establish a connection between the client application and the Keycloak server. | |
| Property | Type | Description | Default |
| ------------------- | :-----------------: | --------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------: |
| refreshOptions | RefreshOptions | Configure token refresh behavior and manage access token lifecycle in client applications. | `{autoRefresh: true, interval: 6000, timeLeft: 70}` |
| keycloakInitOptions | KeycloakInitOptions | Configure Keycloak's behavior during client application initialization. | `{onLoad: "check-sso", pkceMethod: "S256"}` |
| keycloakConfig | KeycloakConfig | The configuration settings required to establish a connection between the client application and the Keycloak server. | |

```ts
interface RefreshOptions {
Expand Down Expand Up @@ -95,7 +95,7 @@ const element = createCustomElement({
onLoad: "check-sso",
pkceMethod: "S256"
// additional configuration, for example:
// scope: "data:read"
// scope: "openid address phone"
},
keycloakConfig: {
url: "http://keycloak-server/base_path",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ it("expect to throw an error if the keycloakConfig not provided ", async () => {
},
keycloakInitOptions: {
onLoad: "check-sso",
pkceMethod: "S256",
scope: "data:read"
pkceMethod: "S256"
},
keycloakConfig: {}
} as KeycloakOptions;
Expand Down
1 change: 0 additions & 1 deletion src/samples/keycloak-sample/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const element = createCustomElement({
keycloakInitOptions: {
onLoad: "check-sso",
pkceMethod: "S256"
//scope: "data:read"
},
keycloakConfig: {
url: import.meta.env.VITE_KEYCLOAK_CONFIG_URL,
Expand Down

0 comments on commit 7439464

Please sign in to comment.