@@ -21,23 +21,32 @@ public class UidCoreClient implements IUidCoreClient, DownloadCloudStorage {
2121 private String userToken ;
2222 private final String appVersionHeader ;
2323 private boolean allowContentFromLocalFileSystem = false ;
24+ private boolean encryptionEnabled ;
2425 private final AttestationResponseHandler attestationResponseHandler ;
2526
2627
2728 public static UidCoreClient createNoAttest (String userToken , AttestationResponseHandler attestationResponseHandler ) {
28- return new UidCoreClient (userToken , CloudUtils .defaultProxy , attestationResponseHandler , null );
29+ return new UidCoreClient (userToken , CloudUtils .defaultProxy , attestationResponseHandler , null , false );
2930 }
3031
3132 public UidCoreClient (String userToken ,
3233 Proxy proxy ,
3334 AttestationResponseHandler attestationResponseHandler ) {
34- this (userToken , proxy , attestationResponseHandler , null );
35+ this (userToken , proxy , attestationResponseHandler , null , false );
36+ }
37+
38+ public UidCoreClient (String userToken ,
39+ Proxy proxy ,
40+ AttestationResponseHandler attestationResponseHandler , boolean encryptionEnabled ) {
41+ this (userToken , proxy , attestationResponseHandler , null , encryptionEnabled );
3542 }
3643
3744 public UidCoreClient (String userToken ,
3845 Proxy proxy ,
3946 AttestationResponseHandler attestationResponseHandler ,
40- URLConnectionHttpClient httpClient ) {
47+ URLConnectionHttpClient httpClient ,
48+ boolean encryptionEnabled ) {
49+ this .encryptionEnabled = encryptionEnabled ;
4150 this .proxy = proxy ;
4251 this .userToken = userToken ;
4352 this .contentStorage = new PreSignedURLStorage (proxy );
@@ -106,6 +115,8 @@ private HttpResponse<String> sendHttpRequest(String path, String attestationToke
106115
107116 HashMap <String , String > headers = new HashMap <>();
108117 headers .put (Const .Http .AppVersionHeader , this .appVersionHeader );
118+ if (this .encryptionEnabled )
119+ headers .put ("Encrypted" , String .valueOf (this .encryptionEnabled ));
109120 if (this .userToken != null && !this .userToken .isBlank ()) {
110121 headers .put ("Authorization" , "Bearer " + this .userToken );
111122 }
0 commit comments