[KEYCLOAK-11771] Add missing type definitions for config
This commit is contained in:
parent
dc97eb7496
commit
5281a38cf7
1 changed files with 17 additions and 2 deletions
|
@ -24,9 +24,9 @@ export = Keycloak;
|
|||
|
||||
/**
|
||||
* Creates a new Keycloak client instance.
|
||||
* @param config Path to a JSON config file or a plain config object.
|
||||
* @param config A configuration object or path to a JSON config file.
|
||||
*/
|
||||
declare function Keycloak<TPromise extends Keycloak.KeycloakPromiseType = 'legacy'>(config?: string|{}): Keycloak.KeycloakInstance<TPromise>;
|
||||
declare function Keycloak<TPromise extends Keycloak.KeycloakPromiseType = 'legacy'>(config?: Keycloak.KeycloakConfig | string): Keycloak.KeycloakInstance<TPromise>;
|
||||
|
||||
declare namespace Keycloak {
|
||||
type KeycloakAdapterName = 'cordova' | 'cordova-native' |'default' | any;
|
||||
|
@ -37,6 +37,21 @@ declare namespace Keycloak {
|
|||
type KeycloakPromiseType = 'legacy' | 'native';
|
||||
type KeycloakPkceMethod = 'S256';
|
||||
|
||||
interface KeycloakConfig {
|
||||
/**
|
||||
* URL to the Keycloak server, for example: http://keycloak-server/auth
|
||||
*/
|
||||
url?: string;
|
||||
/**
|
||||
* Name of the realm, for example: 'myrealm'
|
||||
*/
|
||||
realm: string;
|
||||
/**
|
||||
* Client identifier, example: 'myapp'
|
||||
*/
|
||||
clientId: string;
|
||||
}
|
||||
|
||||
interface KeycloakInitOptions {
|
||||
/**
|
||||
* Adds a [cryptographic nonce](https://en.wikipedia.org/wiki/Cryptographic_nonce)
|
||||
|
|
Loading…
Reference in a new issue