diff options
author | Bjørn Christian Seime <bjorn.christian@seime.no> | 2020-03-02 20:14:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-02 20:14:48 +0100 |
commit | de22b211316e6cafeba4eef803b3796f93cc6721 (patch) | |
tree | 56426d0ee8702393718440da747ae39b78cec9ad | |
parent | 9b6b0c8e13fd688747fdc7abc5aad479f958e34e (diff) |
Revert "Add access token expiry time"
-rw-r--r-- | vespa-athenz/pom.xml | 12 | ||||
-rw-r--r-- | vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/AthenzAccessToken.java | 9 |
2 files changed, 1 insertions, 20 deletions
diff --git a/vespa-athenz/pom.xml b/vespa-athenz/pom.xml index 7d2ad924ae3..0f23eaed964 100644 --- a/vespa-athenz/pom.xml +++ b/vespa-athenz/pom.xml @@ -131,17 +131,7 @@ <artifactId>jackson-annotations</artifactId> </exclusion> </exclusions> - </dependency> - <dependency> - <groupId>com.auth0</groupId> - <artifactId>java-jwt</artifactId> - <exclusions> - <exclusion> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - </exclusion> - </exclusions> - </dependency> + </dependency> </dependencies> <build> diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/AthenzAccessToken.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/AthenzAccessToken.java index 7ad97f8ac3c..49b10a37329 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/AthenzAccessToken.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/AthenzAccessToken.java @@ -1,10 +1,6 @@ // Copyright 2020 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.athenz.api; -import com.auth0.jwt.JWT; -import com.auth0.jwt.interfaces.DecodedJWT; - -import java.time.Instant; import java.util.Objects; /** @@ -19,11 +15,9 @@ public class AthenzAccessToken { private static final String BEARER_TOKEN_PREFIX = "Bearer "; private final String value; - private final DecodedJWT jwt; public AthenzAccessToken(String value) { this.value = stripBearerTokenPrefix(value); - this.jwt = JWT.decode(this.value); } private static String stripBearerTokenPrefix(String rawValue) { @@ -39,9 +33,6 @@ public class AthenzAccessToken { public String value() { return value; } public String valueWithBearerPrefix() { return BEARER_TOKEN_PREFIX + value; } - public Instant getExpiryTime () { - return jwt.getExpiresAt().toInstant(); - } @Override public String toString() { return "AthenzAccessToken{value='" + value + "'}"; } |