mirror of
https://github.com/keycloak/keycloak.git
synced 2026-01-10 15:32:05 -03:30
Remove usage of deprecated Promise.success()/error() in example (#15179)
References:
- 0362d3a4304eccc66a5e4d018b39689883f126a3
- 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
@ -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…
x
Reference in New Issue
Block a user