@@ -142,6 +142,7 @@ <h1>ClientId: <span id="clientInfo"></span></h1>
142
142
< button name ="securityBtn " onclick ="showSecurity() " class ="security "> Security</ button >
143
143
< button name ="appsBtn " onclick ="showApps() " class ="apps "> Apps</ button >
144
144
< button name ="reauthBtn " onclick ="enforceCurrentAuth() " class ="reauth "> ReAuth</ button >
145
+ < button name ="refreshBtn " onclick ="refreshToken() " class ="refresh "> Refresh</ button >
145
146
< button name ="stepupBtn " onclick ="showStepUp() " class ="stepup "> Stepup</ button >
146
147
< button name ="switchContextBtn " onclick ="switchContext() " class ="switchContext "> Switch Context</ button >
147
148
< button name ="accountBtn " onclick ="keycloak.accountManagement() " class ="account "> Account</ button >
@@ -231,8 +232,8 @@ <h1>ClientId: <span id="clientInfo"></span></h1>
231
232
232
233
} ;
233
234
234
- const allContextClasses = [ "profile" , "account" , "settings" , "meinfo" , "token" , "idToken" , "userinfo" , "security" , "apps" , "reauth" , "logout" , "deleteAccount" , "switchContext" , "revoke" , "stepup" ] ;
235
- const contextClassesToHideDefault = [ "meinfo" , "token" , "idToken" , "userinfo" , "reauth" , "account" , "deleteAccount" , "switchContext" , "revoke" , "stepup" ] ;
235
+ const allContextClasses = [ "profile" , "account" , "settings" , "meinfo" , "token" , "idToken" , "userinfo" , "security" , "apps" , "reauth" , "logout" , "deleteAccount" , "switchContext" , "revoke" , "stepup" , "refresh" ] ;
236
+ const contextClassesToHideDefault = [ "meinfo" , "token" , "idToken" , "userinfo" , "reauth" , "account" , "deleteAccount" , "switchContext" , "revoke" , "stepup" , "refresh" ] ;
236
237
const contextClassesToShowDefault = [ ...allContextClasses ] . filter ( ( value , index , arr ) => {
237
238
return ! contextClassesToHideDefault . includes ( value ) ;
238
239
} ) ;
@@ -286,6 +287,10 @@ <h1>ClientId: <span id="clientInfo"></span></h1>
286
287
} ) ;
287
288
}
288
289
290
+ window . refreshToken = async function ( ) {
291
+ await keycloak . updateToken ( - 1 ) ;
292
+ }
293
+
289
294
window . revokeToken = async function ( ) {
290
295
291
296
const bodyData = new URLSearchParams ( ) ;
0 commit comments