Skip to content

Commit

Permalink
ignore validation method
Browse files Browse the repository at this point in the history
  • Loading branch information
thoniTUB committed Nov 15, 2021
1 parent 7b65c75 commit 0d55b5d
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.bakdata.conquery.models.auth.apitoken.ApiTokenRealm;
import com.bakdata.conquery.models.auth.apitoken.Scopes;
import com.bakdata.conquery.models.auth.entities.User;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.dropwizard.validation.ValidationMethod;
import lombok.*;
import lombok.experimental.Accessors;
Expand Down Expand Up @@ -32,6 +33,7 @@ public abstract class ApiTokenDataRepresentation {
protected Set<Scopes> scopes;

@ValidationMethod
@JsonIgnore
boolean isNotExpired() {
final LocalDate now = LocalDate.now();
return expirationDate.isAfter(now) || expirationDate.isEqual(now);
Expand Down

0 comments on commit 0d55b5d

Please sign in to comment.