diff options
author | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-07-12 13:32:20 +0200 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@yahooinc.com> | 2023-07-12 13:37:30 +0200 |
commit | 876ca0b666b01fd88be644a1e31065c5707254f0 (patch) | |
tree | 8f9a3d6e08248e990698ce263358b9c27118baf1 /controller-api | |
parent | 5df78771f0ff297c7d83eaaaa71df067896d5520 (diff) |
Add expiration concept to data plane tokens
Diffstat (limited to 'controller-api')
2 files changed, 7 insertions, 2 deletions
diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneToken.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneToken.java index f0cc87df1fe..76df5ce13dd 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneToken.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneToken.java @@ -1,6 +1,9 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.hosted.controller.api.integration.dataplanetoken; +import java.time.Instant; +import java.util.Optional; + /** * Represents a generated data plane token. * @@ -8,5 +11,5 @@ package com.yahoo.vespa.hosted.controller.api.integration.dataplanetoken; * * @author mortent */ -public record DataplaneToken(TokenId tokenId, FingerPrint fingerPrint, String tokenValue) { +public record DataplaneToken(TokenId tokenId, FingerPrint fingerPrint, String tokenValue, Optional<Instant> expiration) { } diff --git a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneTokenVersions.java b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneTokenVersions.java index 618bfbc8a41..1ce558bd84e 100644 --- a/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneTokenVersions.java +++ b/controller-api/src/main/java/com/yahoo/vespa/hosted/controller/api/integration/dataplanetoken/DataplaneTokenVersions.java @@ -3,6 +3,7 @@ package com.yahoo.vespa.hosted.controller.api.integration.dataplanetoken; import java.time.Instant; import java.util.List; +import java.util.Optional; /** * List of dataplane token versions of a token id. @@ -10,6 +11,7 @@ import java.util.List; * @author mortent */ public record DataplaneTokenVersions(TokenId tokenId, List<Version> tokenVersions) { - public record Version(FingerPrint fingerPrint, String checkAccessHash, Instant creationTime, String author) { + public record Version(FingerPrint fingerPrint, String checkAccessHash, Instant creationTime, + Optional<Instant> expiration, String author) { } } |