diff --git a/adapters/oidc/js/src/main/resources/keycloak.d.ts b/adapters/oidc/js/src/main/resources/keycloak.d.ts index b666eb8120..884ab5ca13 100644 --- a/adapters/oidc/js/src/main/resources/keycloak.d.ts +++ b/adapters/oidc/js/src/main/resources/keycloak.d.ts @@ -208,6 +208,13 @@ declare namespace Keycloak { cordovaOptions?: { [optionName: string]: string }; } + interface KeycloakLogoutOptions { + /** + * Specifies the uri to redirect to after logout. + */ + redirectUri?: string; + } + type KeycloakPromiseCallback = (result: T) => void; class KeycloakPromise extends Promise { @@ -233,7 +240,7 @@ declare namespace Keycloak { interface KeycloakAdapter { login(options?: KeycloakLoginOptions): KeycloakPromise; - logout(options?: any): KeycloakPromise; + logout(options?: KeycloakLogoutOptions): KeycloakPromise; register(options?: KeycloakLoginOptions): KeycloakPromise; accountManagement(): KeycloakPromise; redirectUri(options: { redirectUri: string; }, encodeHash: boolean): string; @@ -454,9 +461,8 @@ declare namespace Keycloak { /** * Redirects to logout. * @param options Logout options. - * @param options.redirectUri Specifies the uri to redirect to after logout. */ - logout(options?: any): KeycloakPromise; + logout(options?: KeycloakLogoutOptions): KeycloakPromise; /** * Redirects to registration form. @@ -479,9 +485,8 @@ declare namespace Keycloak { /** * Returns the URL to logout the user. * @param options Logout options. - * @param options.redirectUri Specifies the uri to redirect to after logout. */ - createLogoutUrl(options?: any): string; + createLogoutUrl(options?: KeycloakLogoutOptions): string; /** * Returns the URL to registration page.