diff --git a/pom.xml b/pom.xml
index 4bab5f8..689ee65 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
de.acosix.alfresco.maven
de.acosix.alfresco.maven.project.parent-6.0.7
- 1.3.0
+ 1.3.1
de.acosix.alfresco.keycloak
@@ -79,7 +79,7 @@
4.5.1
4.4.3
- 1.1.0
+ 1.2.1
1.1.0.0
diff --git a/repository/src/main/java/de/acosix/alfresco/keycloak/repo/client/IDMClientImpl.java b/repository/src/main/java/de/acosix/alfresco/keycloak/repo/client/IDMClientImpl.java
index dcc59db..c5c4aaf 100644
--- a/repository/src/main/java/de/acosix/alfresco/keycloak/repo/client/IDMClientImpl.java
+++ b/repository/src/main/java/de/acosix/alfresco/keycloak/repo/client/IDMClientImpl.java
@@ -638,7 +638,7 @@ public class IDMClientImpl implements InitializingBean, IDMClient
final AccessToken accessToken = tokens.getAccessToken();
- if ((accessToken.getExpiration() - this.deployment.getTokenMinimumTimeToLive()) <= Time.currentTime())
+ if ((accessToken.getExp() - this.deployment.getTokenMinimumTimeToLive()) <= Time.currentTime())
{
throw new AlfrescoRuntimeException("Failed to retrieve / refresh the access token with a longer time-to-live than the minimum");
}
diff --git a/repository/src/main/java/de/acosix/alfresco/keycloak/repo/util/RefreshableAccessTokenHolder.java b/repository/src/main/java/de/acosix/alfresco/keycloak/repo/util/RefreshableAccessTokenHolder.java
index 8e3bd2a..c00d61b 100644
--- a/repository/src/main/java/de/acosix/alfresco/keycloak/repo/util/RefreshableAccessTokenHolder.java
+++ b/repository/src/main/java/de/acosix/alfresco/keycloak/repo/util/RefreshableAccessTokenHolder.java
@@ -43,7 +43,7 @@ public class RefreshableAccessTokenHolder implements Serializable
protected final String refreshToken;
- protected final int refreshExpiration;
+ protected final long refreshExpiration;
/**
* Constructs a new instance of this class from an access token response, typically from an initial authentication or token refresh
@@ -64,7 +64,7 @@ public class RefreshableAccessTokenHolder implements Serializable
this.token = tokenResponse.getToken();
this.refreshToken = tokenResponse.getRefreshToken();
- this.refreshExpiration = Time.currentTime() + (int) tokenResponse.getRefreshExpiresIn();
+ this.refreshExpiration = Time.currentTime() + tokenResponse.getRefreshExpiresIn();
}
/**
@@ -93,7 +93,7 @@ public class RefreshableAccessTokenHolder implements Serializable
this.token = token;
this.refreshToken = refreshToken;
// no explicit refresh expiration, so assume validity period is 1/100th
- this.refreshExpiration = Time.currentTime() - (accessToken.getExpiration() - Time.currentTime()) / 100;
+ this.refreshExpiration = Time.currentTime() - (accessToken.getExp() - Time.currentTime()) / 100;
}
/**
@@ -139,7 +139,7 @@ public class RefreshableAccessTokenHolder implements Serializable
*/
public boolean shouldRefresh(final int minTokenTTL)
{
- final boolean shouldRefresh = this.refreshToken != null && this.accessToken.getExpiration() - minTokenTTL < Time.currentTime();
+ final boolean shouldRefresh = this.refreshToken != null && this.accessToken.getExp() - minTokenTTL < Time.currentTime();
return shouldRefresh;
}
diff --git a/share/src/main/java/de/acosix/alfresco/keycloak/share/util/RefreshableAccessTokenHolder.java b/share/src/main/java/de/acosix/alfresco/keycloak/share/util/RefreshableAccessTokenHolder.java
index 8876f19..7667444 100644
--- a/share/src/main/java/de/acosix/alfresco/keycloak/share/util/RefreshableAccessTokenHolder.java
+++ b/share/src/main/java/de/acosix/alfresco/keycloak/share/util/RefreshableAccessTokenHolder.java
@@ -43,7 +43,7 @@ public class RefreshableAccessTokenHolder implements Serializable
protected final String refreshToken;
- protected final int refreshExpiration;
+ protected final long refreshExpiration;
/**
* Constructs a new instance of this class from an access token response, typically from an initial authentication or token refresh
@@ -64,7 +64,7 @@ public class RefreshableAccessTokenHolder implements Serializable
this.token = tokenResponse.getToken();
this.refreshToken = tokenResponse.getRefreshToken();
- this.refreshExpiration = Time.currentTime() + (int) tokenResponse.getRefreshExpiresIn();
+ this.refreshExpiration = Time.currentTime() + tokenResponse.getRefreshExpiresIn();
}
/**
@@ -93,7 +93,7 @@ public class RefreshableAccessTokenHolder implements Serializable
this.token = token;
this.refreshToken = refreshToken;
// no explicit refresh expiration, so assume validity period is 1/100th
- this.refreshExpiration = Time.currentTime() - (accessToken.getExpiration() - Time.currentTime()) / 100;
+ this.refreshExpiration = Time.currentTime() - (accessToken.getExp() - Time.currentTime()) / 100;
}
/**
@@ -139,7 +139,7 @@ public class RefreshableAccessTokenHolder implements Serializable
*/
public boolean shouldRefresh(final int minTokenTTL)
{
- final boolean shouldRefresh = this.refreshToken != null && this.accessToken.getExpiration() - minTokenTTL < Time.currentTime();
+ final boolean shouldRefresh = this.refreshToken != null && this.accessToken.getExp() - minTokenTTL < Time.currentTime();
return shouldRefresh;
}