Remove usage of deprecated Promise.success()/error() in example (#15179)
References: -0362d3a430
-650f3a8367/adapters/oidc/js/dist/keycloak.d.ts (L283-L297)
Co-authored-by: Stian Thorgersen <stianst@gmail.com>
This commit is contained in:
parent
2267352b9e
commit
88b0e48e63
1 changed files with 5 additions and 5 deletions
|
@ -53,9 +53,9 @@
|
|||
|
||||
<script>
|
||||
function loadProfile() {
|
||||
keycloak.loadUserProfile().success(function(profile) {
|
||||
keycloak.loadUserProfile().then(function(profile) {
|
||||
output(profile);
|
||||
}).error(function() {
|
||||
}).catch(function() {
|
||||
output('Failed to load profile');
|
||||
});
|
||||
}
|
||||
|
@ -82,9 +82,9 @@
|
|||
}
|
||||
|
||||
function loadUserInfo() {
|
||||
keycloak.loadUserInfo().success(function(userInfo) {
|
||||
keycloak.loadUserInfo().then(function(userInfo) {
|
||||
output(userInfo);
|
||||
}).error(function() {
|
||||
}).catch(function() {
|
||||
output('Failed to load user info');
|
||||
});
|
||||
}
|
||||
|
@ -167,7 +167,7 @@
|
|||
}
|
||||
};
|
||||
|
||||
// Flow can be changed to 'implicit' or 'hybrid', but then client must enable implicit flow in admin console too
|
||||
// Flow can be changed to 'implicit' or 'hybrid', but then client must enable implicit flow in admin console too
|
||||
var initOptions = {
|
||||
responseMode: 'fragment',
|
||||
flow: 'standard'
|
||||
|
|
Loading…
Reference in a new issue