Search in sources :

Example 1 with StorageAuthResponse

use of org.whispersystems.signalservice.api.storage.StorageAuthResponse in project Signal-Android by WhisperSystems.

the class PushServiceSocket method getStorageAuth.

public String getStorageAuth() throws IOException {
    String response = makeServiceRequest("/v1/storage/auth", "GET", null);
    StorageAuthResponse authResponse = JsonUtil.fromJson(response, StorageAuthResponse.class);
    return Credentials.basic(authResponse.getUsername(), authResponse.getPassword());
}
Also used : GroupsV2AuthorizationString(org.whispersystems.signalservice.api.groupsv2.GroupsV2AuthorizationString) StorageAuthResponse(org.whispersystems.signalservice.api.storage.StorageAuthResponse)

Example 2 with StorageAuthResponse

use of org.whispersystems.signalservice.api.storage.StorageAuthResponse in project Signal-Android by signalapp.

the class PushServiceSocket method getStorageAuth.

public String getStorageAuth() throws IOException {
    String response = makeServiceRequest("/v1/storage/auth", "GET", null);
    StorageAuthResponse authResponse = JsonUtil.fromJson(response, StorageAuthResponse.class);
    return Credentials.basic(authResponse.getUsername(), authResponse.getPassword());
}
Also used : GroupsV2AuthorizationString(org.whispersystems.signalservice.api.groupsv2.GroupsV2AuthorizationString) StorageAuthResponse(org.whispersystems.signalservice.api.storage.StorageAuthResponse)

Aggregations

GroupsV2AuthorizationString (org.whispersystems.signalservice.api.groupsv2.GroupsV2AuthorizationString)2 StorageAuthResponse (org.whispersystems.signalservice.api.storage.StorageAuthResponse)2