aboutsummaryrefslogtreecommitdiffstats
path: root/vespa-athenz
diff options
context:
space:
mode:
authorMorten Tokle <mortent@verizonmedia.com>2019-10-29 09:37:50 +0100
committerMorten Tokle <mortent@verizonmedia.com>2019-10-29 09:53:45 +0100
commit16389caf12181937f2c4d66f2f62f565e0c5ff12 (patch)
treef501d1004820e251eb8366b5dffbe353ac2aeee5 /vespa-athenz
parentcd8e24124d02ccfcbffc843115ddffecca20cbe4 (diff)
Validate register and refresh
Diffstat (limited to 'vespa-athenz')
-rw-r--r--vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/SignedIdentityDocument.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/SignedIdentityDocument.java b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/SignedIdentityDocument.java
index dc5dae9d516..e5225f2569b 100644
--- a/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/SignedIdentityDocument.java
+++ b/vespa-athenz/src/main/java/com/yahoo/vespa/athenz/identityprovider/api/SignedIdentityDocument.java
@@ -4,6 +4,7 @@ package com.yahoo.vespa.athenz.identityprovider.api;
import com.yahoo.vespa.athenz.api.AthenzService;
import java.time.Instant;
+import java.util.Objects;
import java.util.Set;
/**
@@ -87,4 +88,26 @@ public class SignedIdentityDocument {
public IdentityType identityType() {
return identityType;
}
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ SignedIdentityDocument that = (SignedIdentityDocument) o;
+ return signingKeyVersion == that.signingKeyVersion &&
+ documentVersion == that.documentVersion &&
+ Objects.equals(signature, that.signature) &&
+ Objects.equals(providerUniqueId, that.providerUniqueId) &&
+ Objects.equals(providerService, that.providerService) &&
+ Objects.equals(configServerHostname, that.configServerHostname) &&
+ Objects.equals(instanceHostname, that.instanceHostname) &&
+ Objects.equals(createdAt, that.createdAt) &&
+ Objects.equals(ipAddresses, that.ipAddresses) &&
+ identityType == that.identityType;
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(signature, signingKeyVersion, providerUniqueId, providerService, documentVersion, configServerHostname, instanceHostname, createdAt, ipAddresses, identityType);
+ }
}