com.checkout.OAuthAccessToken Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of checkout-sdk-java Show documentation
Show all versions of checkout-sdk-java Show documentation
Checkout SDK for Java https://checkout.com
package com.checkout;
import java.time.LocalDateTime;
import static java.time.LocalDateTime.now;
final class OAuthAccessToken {
private final String token;
private final LocalDateTime expirationDate;
OAuthAccessToken(final String token, final LocalDateTime expirationDate) {
this.token = token;
this.expirationDate = expirationDate;
}
boolean isValid() {
if (expirationDate == null) {
return false;
}
return expirationDate.isAfter(now());
}
String getToken() {
return token;
}
LocalDateTime getExpirationDate() {
return expirationDate;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy