DigestCredential

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

Digest credentials.

See also

Constructors

Link copied to clipboard
constructor(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

a digest algorithm name

Link copied to clipboard

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

Link copied to clipboard

may be an absolute URI or *

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

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

a digest authentication realm

Link copied to clipboard

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

Link copied to clipboard

Functions

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.