diff options
author | Morten Tokle <mortent@verizonmedia.com> | 2020-02-28 08:26:15 +0100 |
---|---|---|
committer | Morten Tokle <mortent@verizonmedia.com> | 2020-03-06 09:04:30 +0100 |
commit | 9449498ebd0f809c6c69de92eb0f4388114bd6fd (patch) | |
tree | c1c33f85f1b01413f495a91df7df245f0e5de5fd /jdisc-security-filters | |
parent | dfc02bdeed09a021229feb01d8f910bcd230a387 (diff) |
Add expiry time
Diffstat (limited to 'jdisc-security-filters')
-rw-r--r-- | jdisc-security-filters/src/test/java/com/yahoo/jdisc/http/filter/security/athenz/AthenzAuthorizationFilterTest.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/jdisc-security-filters/src/test/java/com/yahoo/jdisc/http/filter/security/athenz/AthenzAuthorizationFilterTest.java b/jdisc-security-filters/src/test/java/com/yahoo/jdisc/http/filter/security/athenz/AthenzAuthorizationFilterTest.java index 1fe8d73eb44..74d09234902 100644 --- a/jdisc-security-filters/src/test/java/com/yahoo/jdisc/http/filter/security/athenz/AthenzAuthorizationFilterTest.java +++ b/jdisc-security-filters/src/test/java/com/yahoo/jdisc/http/filter/security/athenz/AthenzAuthorizationFilterTest.java @@ -1,6 +1,8 @@ // Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jdisc.http.filter.security.athenz; +import com.auth0.jwt.JWT; +import com.auth0.jwt.algorithms.Algorithm; import com.yahoo.container.jdisc.RequestHandlerTestDriver.MockResponseHandler; import com.yahoo.jdisc.Response; import com.yahoo.jdisc.http.filter.DiscFilterRequest; @@ -48,7 +50,7 @@ public class AthenzAuthorizationFilterTest { private static final AthenzResourceName RESOURCE_NAME = new AthenzResourceName("domain", "my-resource-name"); private static final ZToken ROLE_TOKEN = new ZToken("v=Z1;d=domain;r=my-role;p=my-domain.my-service"); - private static final AthenzAccessToken ACCESS_TOKEN = new AthenzAccessToken("access-token"); + private static final AthenzAccessToken ACCESS_TOKEN = new AthenzAccessToken(JWT.create().sign(Algorithm.none())); private static final AthenzIdentity IDENTITY = AthenzIdentities.from("user.john"); private static final AthenzRole ROLE = new AthenzRole("my.domain", "my-role"); private static final X509Certificate IDENTITY_CERTIFICATE = createDummyIdentityCertificate(IDENTITY); |