set timeSkew when passing tokens to init(), also allow timeSkew to be passed as a parameter / KEYCLOAK-2322
This commit is contained in:
1 parent
75d715d8a7
commit
e9445cfc20
2 files changed
+3
No files matched your search
@@ -234,6 +234,8 @@ new Keycloak({ url: 'http://localhost/auth', realm: 'myrealm', clientId: 'myApp'
|
|||||||
<listitem>onLoad - specifies an action to do on load, can be either 'login-required' or 'check-sso'</listitem>
|
<listitem>onLoad - specifies an action to do on load, can be either 'login-required' or 'check-sso'</listitem>
|
||||||
<listitem>token - set an initial value for the token</listitem>
|
<listitem>token - set an initial value for the token</listitem>
|
||||||
<listitem>refreshToken - set an initial value for the refresh token</listitem>
|
<listitem>refreshToken - set an initial value for the refresh token</listitem>
|
||||||
|
<listitem>idToken - set an initial value for the id token (only together with token or refreshToken)</listitem>
|
||||||
|
<listitem>timeSkew - set an initial value for skew between local time and Keycloak server in seconds (only together with token or refreshToken)</listitem>
|
||||||
<listitem>checkLoginIframe - set to enable/disable monitoring login state (default is true)</listitem>
|
<listitem>checkLoginIframe - set to enable/disable monitoring login state (default is true)</listitem>
|
||||||
<listitem>checkLoginIframeInterval - set the interval to check login state (default is 5 seconds)</listitem>
|
<listitem>checkLoginIframeInterval - set the interval to check login state (default is 5 seconds)</listitem>
|
||||||
<listitem>responseMode - set the OpenID Connect response mode send to Keycloak server at login request. Valid values are <literal>query</literal> or <literal>fragment</literal> .
|
<listitem>responseMode - set the OpenID Connect response mode send to Keycloak server at login request. Valid values are <literal>query</literal> or <literal>fragment</literal> .
|
||||||
|
|||||||
@@ -129,6 +129,7 @@
|
|||||||
} else if (initOptions) {
|
} else if (initOptions) {
|
||||||
if (initOptions.token || initOptions.refreshToken) {
|
if (initOptions.token || initOptions.refreshToken) {
|
||||||
setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken, false);
|
setToken(initOptions.token, initOptions.refreshToken, initOptions.idToken, false);
|
||||||
|
kc.timeSkew = initOptions.timeSkew || 0;
|
||||||
|
|
||||||
if (loginIframe.enable) {
|
if (loginIframe.enable) {
|
||||||
setupCheckLoginIframe().success(function() {
|
setupCheckLoginIframe().success(function() {
|
||||||
|
|||||||
Reference in new issue
Block a user