Read optional client secret configuration to ensure we can use Basic auth as well
This commit is contained in:
parent
740943290c
commit
d3a2617d3c
1 changed files with 2 additions and 0 deletions
|
@ -329,6 +329,7 @@ var Keycloak = function (config) {
|
|||
kc.authServerUrl = config['auth-server-url'];
|
||||
kc.realm = config['realm'];
|
||||
kc.clientId = config['resource'];
|
||||
kc.clientSecret = (config['credentials'] || {})['secret'];
|
||||
|
||||
promise.setSuccess();
|
||||
} else {
|
||||
|
@ -360,6 +361,7 @@ var Keycloak = function (config) {
|
|||
kc.authServerUrl = config.url;
|
||||
kc.realm = config.realm;
|
||||
kc.clientId = config.clientId;
|
||||
kc.clientSecret = (config.credentials || {}).secret;
|
||||
|
||||
promise.setSuccess();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue