@@ -29,6 +29,7 @@ public class AttestationResponseHandler {
2929
3030 private final IAttestationProvider attestationProvider ;
3131 private final String clientApiToken ;
32+ private final String operatorType ;
3233 private final ApplicationVersion appVersion ;
3334 private final AtomicReference <String > attestationToken ;
3435 private final AtomicReference <String > optOutJwt ;
@@ -52,15 +53,17 @@ public class AttestationResponseHandler {
5253 public AttestationResponseHandler (Vertx vertx ,
5354 String attestationEndpoint ,
5455 String clientApiToken ,
56+ String operatorType ,
5557 ApplicationVersion appVersion ,
5658 IAttestationProvider attestationProvider ,
5759 Handler <Pair <Integer , String >> responseWatcher ,
5860 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 );
6062 }
6163 public AttestationResponseHandler (Vertx vertx ,
6264 String attestationEndpoint ,
6365 String clientApiToken ,
66+ String operatorType ,
6467 ApplicationVersion appVersion ,
6568 IAttestationProvider attestationProvider ,
6669 Handler <Pair <Integer , String >> responseWatcher ,
@@ -73,6 +76,7 @@ public AttestationResponseHandler(Vertx vertx,
7376 this .attestationEndpoint = attestationEndpoint ;
7477 this .encodedAttestationEndpoint = this .encodeStringUnicodeAttestationEndpoint (attestationEndpoint );
7578 this .clientApiToken = clientApiToken ;
79+ this .operatorType = operatorType ;
7680 this .appVersion = appVersion ;
7781 this .attestationProvider = attestationProvider ;
7882 this .attestationToken = new AtomicReference <>(null );
@@ -158,7 +162,8 @@ public void attest() throws IOException, AttestationResponseHandlerException {
158162 "attestation_request" , Base64 .getEncoder ().encodeToString (attestationProvider .getAttestationRequest (publicKey , this .encodedAttestationEndpoint )),
159163 "public_key" , Base64 .getEncoder ().encodeToString (publicKey ),
160164 "application_name" , appVersion .getAppName (),
161- "application_version" , appVersion .getAppVersion ()
165+ "application_version" , appVersion .getAppVersion (),
166+ "operator_type" , this .operatorType
162167 );
163168 JsonObject components = new JsonObject ();
164169 for (Map .Entry <String , String > kv : appVersion .getComponentVersions ().entrySet ()) {
@@ -178,7 +183,7 @@ public void attest() throws IOException, AttestationResponseHandlerException {
178183 notifyResponseWatcher (statusCode , responseBody );
179184
180185 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 );
182187 throw new AttestationResponseHandlerException (statusCode , "unexpected status code from uid core service" );
183188 }
184189
0 commit comments