Class BackupAuthCredentialRequest
-
- All Implemented Interfaces:
public final class BackupAuthCredentialRequest extends ByteArray
-
-
Field Summary
Fields Modifier and Type Field Description public final static ByteArray.UncheckedAndUnclonedUNCHECKED_AND_UNCLONED
-
Constructor Summary
Constructors Constructor Description BackupAuthCredentialRequest(Array<byte> contents)
-
Method Summary
Modifier and Type Method Description BackupAuthCredentialResponseissueCredential(Instant timestamp, BackupLevel backupLevel, BackupCredentialType type, GenericServerSecretParams params)Issues a BackupAuthCredential. BackupAuthCredentialResponseissueCredential(Instant timestamp, BackupLevel backupLevel, BackupCredentialType type, GenericServerSecretParams params, SecureRandom secureRandom)Issues a BackupAuthCredential, using a dedicated source of randomness. -
-
Constructor Detail
-
BackupAuthCredentialRequest
BackupAuthCredentialRequest(Array<byte> contents)
-
-
Method Detail
-
issueCredential
BackupAuthCredentialResponse issueCredential(Instant timestamp, BackupLevel backupLevel, BackupCredentialType type, GenericServerSecretParams params)
Issues a BackupAuthCredential.
- Parameters:
timestamp- Must be a round number of days.backupLevel- The BackupLevel that this credential is authorized fortype- The type of upload the credential will be used forparams- The params that will be used by the verifying server to verify this credential.
-
issueCredential
BackupAuthCredentialResponse issueCredential(Instant timestamp, BackupLevel backupLevel, BackupCredentialType type, GenericServerSecretParams params, SecureRandom secureRandom)
Issues a BackupAuthCredential, using a dedicated source of randomness.
This can be used to make tests deterministic. Prefer issueCredential if the source of randomness doesn't matter.
- Parameters:
timestamp- Must be a round number of days.backupLevel- The BackupLevel that this credential is authorized fortype- The type of upload the credential will be used forparams- The params that will be used by the verifying server to verify this credential.secureRandom- Used to hide the server's secrets and make the issued credential unique.
-
-
-
-