blob: 169e64d7fe66c69409c4198af3a62c5a4f732dbe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.athenz.client.zts;
import com.yahoo.vespa.athenz.api.NToken;
import java.security.cert.X509Certificate;
import java.util.Optional;
/**
* The identity of an instance of a launched service.
*
* @author bjorncs
*/
public class InstanceIdentity {
private final X509Certificate certificate;
private final NToken nToken;
public InstanceIdentity(X509Certificate certificate) {
this(certificate, null);
}
public InstanceIdentity(X509Certificate certificate, NToken nToken) {
this.certificate = certificate;
this.nToken = nToken;
}
public X509Certificate certificate() {
return certificate;
}
public Optional<NToken> nToken() {
return Optional.ofNullable(nToken);
}
}
|