mirror of
https://github.com/keycloak/keycloak.git
synced 2026-04-24 16:08:48 -05:00
Remove usage of deprecated Promise.success()/error() in example (#15179)
References:
- 0362d3a430
- https://github.com/keycloak/keycloak/blob/650f3a8367ea5d5f818d36b4c5fecf50d0576154/adapters/oidc/js/dist/keycloak.d.ts#L283-L297
Co-authored-by: Stian Thorgersen <stianst@gmail.com>
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user