@@ -29,6 +29,7 @@ public class AttestationResponseHandler {
29
29
30
30
private final IAttestationProvider attestationProvider ;
31
31
private final String clientApiToken ;
32
+ private final String operatorType ;
32
33
private final ApplicationVersion appVersion ;
33
34
private final AtomicReference <String > attestationToken ;
34
35
private final AtomicReference <String > optOutJwt ;
@@ -52,15 +53,17 @@ public class AttestationResponseHandler {
52
53
public AttestationResponseHandler (Vertx vertx ,
53
54
String attestationEndpoint ,
54
55
String clientApiToken ,
56
+ String operatorType ,
55
57
ApplicationVersion appVersion ,
56
58
IAttestationProvider attestationProvider ,
57
59
Handler <Pair <Integer , String >> responseWatcher ,
58
60
Proxy proxy ) {
59
- this (vertx , attestationEndpoint , clientApiToken , appVersion , attestationProvider , responseWatcher , proxy , new InstantClock (), null , null , 60000 );
61
+ this (vertx , attestationEndpoint , clientApiToken , operatorType , appVersion , attestationProvider , responseWatcher , proxy , new InstantClock (), null , null , 60000 );
60
62
}
61
63
public AttestationResponseHandler (Vertx vertx ,
62
64
String attestationEndpoint ,
63
65
String clientApiToken ,
66
+ String operatorType ,
64
67
ApplicationVersion appVersion ,
65
68
IAttestationProvider attestationProvider ,
66
69
Handler <Pair <Integer , String >> responseWatcher ,
@@ -73,6 +76,7 @@ public AttestationResponseHandler(Vertx vertx,
73
76
this .attestationEndpoint = attestationEndpoint ;
74
77
this .encodedAttestationEndpoint = this .encodeStringUnicodeAttestationEndpoint (attestationEndpoint );
75
78
this .clientApiToken = clientApiToken ;
79
+ this .operatorType = operatorType ;
76
80
this .appVersion = appVersion ;
77
81
this .attestationProvider = attestationProvider ;
78
82
this .attestationToken = new AtomicReference <>(null );
@@ -158,7 +162,8 @@ public void attest() throws IOException, AttestationResponseHandlerException {
158
162
"attestation_request" , Base64 .getEncoder ().encodeToString (attestationProvider .getAttestationRequest (publicKey , this .encodedAttestationEndpoint )),
159
163
"public_key" , Base64 .getEncoder ().encodeToString (publicKey ),
160
164
"application_name" , appVersion .getAppName (),
161
- "application_version" , appVersion .getAppVersion ()
165
+ "application_version" , appVersion .getAppVersion (),
166
+ "operator_type" , this .operatorType
162
167
);
163
168
JsonObject components = new JsonObject ();
164
169
for (Map .Entry <String , String > kv : appVersion .getComponentVersions ().entrySet ()) {
@@ -178,7 +183,7 @@ public void attest() throws IOException, AttestationResponseHandlerException {
178
183
notifyResponseWatcher (statusCode , responseBody );
179
184
180
185
if (statusCode < 200 || statusCode >= 300 ) {
181
- LOGGER .warn ("attestation failed with UID2 Core returning statusCode=" + statusCode );
186
+ LOGGER .warn ("attestation failed with UID2 Core returning statusCode={}" , statusCode );
182
187
throw new AttestationResponseHandlerException (statusCode , "unexpected status code from uid core service" );
183
188
}
184
189
0 commit comments