Skip to content

Commit

Permalink
check connection expire time
Browse files Browse the repository at this point in the history
  • Loading branch information
sfussenegger committed May 24, 2011
1 parent 6b9056a commit fb4681e
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -61,6 +61,9 @@ public SocialAuthenticationToken(final ConnectionData connection,
if (connection.getProviderId() == null) {
throw new NullPointerException("connection.providerId");
}
if (connection.getExpireTime() != null && connection.getExpireTime() < System.currentTimeMillis()) {
throw new IllegalArgumentException("connection.expireTime < currentTime");
}

this.providerId = connection.getProviderId();
this.principle = connection;
Expand Down

0 comments on commit fb4681e

Please sign in to comment.