All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.whispersystems.signalservice.api.svr.Svr3Credentials.kt Maven / Gradle / Ivy

There is a newer version: 2.15.3_unofficial_107
Show newest version
/*
 * Copyright 2024 Signal Messenger, LLC
 * SPDX-License-Identifier: AGPL-3.0-only
 */

package org.whispersystems.signalservice.api.svr

import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import org.whispersystems.signalservice.internal.push.AuthCredentials
import org.whispersystems.signalservice.internal.push.ByteArrayDeserializerBase64

/**
 * Response object when fetching SVR3 auth credentials. We also use it elsewhere as a convenient container
 * for the (username, password, shareset) tuple.
 */
class Svr3Credentials(
  @JsonProperty
  val username: String,

  @JsonProperty
  val password: String,

  @JsonProperty
  @JsonDeserialize(using = ByteArrayDeserializerBase64::class)
  val shareSet: ByteArray?
) {
  val authCredentials: AuthCredentials
    get() = AuthCredentials.create(username, password)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy