From 68873c29b7bd3927e12a74730c48c27a3aee3063 Mon Sep 17 00:00:00 2001 From: Charles Jourdan Date: Fri, 14 Sep 2018 14:34:14 +0200 Subject: [PATCH] Fix on type for KeycloakInstance.realmAccess and KeycloakInstance.ressourceAccess --- adapters/oidc/js/src/main/resources/keycloak.d.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/adapters/oidc/js/src/main/resources/keycloak.d.ts b/adapters/oidc/js/src/main/resources/keycloak.d.ts index f62598279f..3f26cb4d68 100644 --- a/adapters/oidc/js/src/main/resources/keycloak.d.ts +++ b/adapters/oidc/js/src/main/resources/keycloak.d.ts @@ -226,6 +226,14 @@ declare namespace Keycloak { resource_access?: string[]; } + interface KeycloakResourceAccess { + [key: string]: KeycloakRoles + } + + interface KeycloakRoles { + roles: string[]; + } + // export interface KeycloakUserInfo {} /** @@ -263,12 +271,12 @@ declare namespace Keycloak { /** * The realm roles associated with the token. */ - realmAccess?: { roles: string[] }; + realmAccess?: KeycloakRoles; /** * The resource roles associated with the token. */ - resourceAccess?: string[]; + resourceAccess?: KeycloakResourceAccess; /** * The base64 encoded token that can be sent in the Authorization header in