@Test public void getExpiredDateFromAccessToken() { long expireInSeconds = 43199; Date minExpireDate = new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(expireInSeconds)); OAuth2TokenResponse accessToken = new OAuth2TokenResponse("e9511922b5e64c49ba0eedcc8d772e76", expireInSeconds, null); Date maxExpireDate = new Date(System.currentTimeMillis() + TimeUnit.SECONDS.toMillis(expireInSeconds)); assertThat(accessToken.getExpiredAtDate(), allOf(OrderingComparison.greaterThanOrEqualTo(minExpireDate), OrderingComparison.lessThanOrEqualTo(maxExpireDate))); }
@Deprecated public Date getExpiredAtDate() { return new Date(expiredTimeMillis); }
OAuth2TokenResponse { @Deprecated public Date getExpiredAtDate() { return new Date(expiredTimeMillis); } }
OAuth2TokenResponse { @Deprecated public Date getExpiredAtDate() { return new Date(expiredTimeMillis); } OAuth2TokenResponse(@Nullable String accessToken, long expiredInSeconds, @Nullable String refreshToken); }
OAuth2TokenResponse { @Deprecated public Date getExpiredAtDate() { return new Date(expiredTimeMillis); } OAuth2TokenResponse(@Nullable String accessToken, long expiredInSeconds, @Nullable String refreshToken); @Nullable String getAccessToken(); @Nullable DecodedJwt getDecodedAccessToken(); @Deprecated Date getExpiredAtDate(); Instant getExpiredAt(); @Nullable String getRefreshToken(); @Override String toString(); }
OAuth2TokenResponse { @Deprecated public Date getExpiredAtDate() { return new Date(expiredTimeMillis); } OAuth2TokenResponse(@Nullable String accessToken, long expiredInSeconds, @Nullable String refreshToken); @Nullable String getAccessToken(); @Nullable DecodedJwt getDecodedAccessToken(); @Deprecated Date getExpiredAtDate(); Instant getExpiredAt(); @Nullable String getRefreshToken(); @Override String toString();  }