From 098446b07081e1afdda82fa2adfe39e31ea02f11 Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Thu, 2 Jul 2020 10:12:56 +0200 Subject: [PATCH] KEYCLOAK-14652 Align custom adapter example with documentation --- adapters/oidc/js/src/main/resources/keycloak.d.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/adapters/oidc/js/src/main/resources/keycloak.d.ts b/adapters/oidc/js/src/main/resources/keycloak.d.ts index 0e092d2829..64f1aad1f0 100644 --- a/adapters/oidc/js/src/main/resources/keycloak.d.ts +++ b/adapters/oidc/js/src/main/resources/keycloak.d.ts @@ -74,14 +74,19 @@ declare namespace Keycloak { * ```ts * import Keycloak, { KeycloakAdapter } from 'keycloak-js'; * - * class MyCustomAdapter implements KeycloakAdapter { - * // Implement methods required by KeycloakAdapter here. - * } + * // Implement the 'KeycloakAdapter' interface so that all required methods are guaranteed to be present. + * const MyCustomAdapter: KeycloakAdapter = { + * login(options) { + * // Write your own implementation here. + * } + * + * // The other methods go here... + * }; * * const keycloak = new Keycloak(); * * keycloak.init({ - * adapter: MyCustomAdapter, + * adapter: MyCustomAdapter, * }); * ``` */