DigestCredential

data class DigestCredential(realm: String, userName: String, digestUri: String, nonce: String, opaque: String?, nonceCount: String?, algorithm: String?, response: String, cnonce: String?, qop: String?) : Credential

Digest credentials.

See also

Constructors

Link copied to clipboard
fun DigestCredential(realm: String, userName: String, digestUri: String, nonce: String, opaque: String?, nonceCount: String?, algorithm: String?, response: String, cnonce: String?, qop: String?)

Properties

Link copied to clipboard
val algorithm: String?

a digest algorithm name

Link copied to clipboard
val cnonce: String?

must be sent if qop is specified and must be null otherwise. Should be passed through unchanged.

Link copied to clipboard
val digestUri: String

may be an absolute URI or *

Link copied to clipboard
val nonce: String
Link copied to clipboard
val nonceCount: String?

must be sent if qop is specified and must be null otherwise

Link copied to clipboard
val opaque: String?

a string of data which should be returned by the client unchanged

Link copied to clipboard
val qop: String?

a quality of protection sign

Link copied to clipboard
val realm: String

a digest authentication realm

Link copied to clipboard
val response: String

consist of 32 hex digits (digested password and other fields as per RFC)

Link copied to clipboard
val userName: String

Extensions

Link copied to clipboard
fun DigestCredential.expectedDigest(method: HttpMethod, digester: MessageDigest, userNameRealmPasswordDigest: ByteArray): ByteArray

Calculates the expected digest bytes for this DigestCredential.

Link copied to clipboard
suspend fun DigestCredential.verifier(method: HttpMethod, digester: MessageDigest, userNameRealmPasswordDigest: suspend (String, String) -> ByteArray?): Boolean

Verifies that credentials are valid for a given method, digester, and userNameRealmPasswordDigest.