diff options
author | Morten Tokle <morten.tokle@gmail.com> | 2018-08-09 09:25:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 09:25:03 +0200 |
commit | f155aa24880f4cf4b51b68643e935ed987141984 (patch) | |
tree | 46c27f67834fa53f193c48f4a65483c4d9266cc7 | |
parent | e09bb9cd8d69b3008cc1ea95e2ef4c9aa85182af (diff) | |
parent | 31ead0f6a7e077d4f866bd02284261e21da8d541 (diff) |
Merge pull request #6519 from vespa-engine/bjorncs/ztoken-getdomain
Add getter for role token domain
-rw-r--r-- | vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/ZToken.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/ZToken.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/ZToken.java index 36c06132532..1691704afd6 100644 --- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/ZToken.java +++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/api/ZToken.java @@ -6,7 +6,6 @@ import com.yahoo.vespa.athenz.utils.AthenzIdentities; import java.util.List; import java.util.Objects; -import java.util.stream.Collectors; import static java.util.stream.Collectors.toList; @@ -31,6 +30,10 @@ public class ZToken { return AthenzIdentities.from(token.getPrincipal()); } + public AthenzDomain getDomain() { + return new AthenzDomain(token.getDomain()); + } + public List<AthenzRole> getRoles() { String domain = token.getDomain(); return token.getRoles().stream() |