cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Fixed a bug with the expiry of refresh tokens with the EhCache provider
Date Wed, 25 Nov 2015 16:22:55 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 23d9ae6ce -> 7fdc9b42d


Fixed a bug with the expiry of refresh tokens with the EhCache provider


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7fdc9b42
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7fdc9b42
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7fdc9b42

Branch: refs/heads/3.0.x-fixes
Commit: 7fdc9b42db61cd94cb1671418db4c08fe5ec2f9b
Parents: 23d9ae6
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Nov 25 16:07:45 2015 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Nov 25 16:22:49 2015 +0000

----------------------------------------------------------------------
 .../cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java | 2 +-
 .../java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7fdc9b42/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
index accd4af..333fecc 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/AbstractOAuthDataProvider.java
@@ -32,7 +32,7 @@ import org.apache.cxf.rs.security.oauth2.utils.OAuthConstants;
 
 public abstract class AbstractOAuthDataProvider implements OAuthDataProvider {
     private long accessTokenLifetime = 3600L;
-    private long refreshTokenLifetime = -1;
+    private long refreshTokenLifetime; // refresh tokens are eternal by default
     
     protected AbstractOAuthDataProvider() {
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/7fdc9b42/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
index 9b4fcba..9a3442a 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/utils/OAuthUtils.java
@@ -166,7 +166,7 @@ public final class OAuthUtils {
     }
     
     public static boolean isExpired(Long issuedAt, Long lifetime) {
-        return lifetime != -1
+        return lifetime != 0L
             && issuedAt + lifetime < System.currentTimeMillis() / 1000;
     }
     


Mime
View raw message