DigestCredential
class DigestCredential(val realm: String, val userName: String, val digestUri: String, val nonce: String, val opaque: String?, val nonceCount: String?, val digestAlgorithm: DigestAlgorithm, val response: String, val cnonce: String?, val qop: String?, val userHash: Boolean = false, val charset: Charset = Charsets.UTF_8)(source)
Digest credentials.
See also
Constructors
Properties
Link copied to clipboard
Link copied to clipboard
The request counter (nc); must be sent if qop is specified
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun copy(realm: String = this.realm, userName: String = this.userName, digestUri: String = this.digestUri, nonce: String = this.nonce, opaque: String? = this.opaque, nonceCount: String? = this.nonceCount, algorithm: String? = this.digestAlgorithm.name, response: String = this.response, cnonce: String? = this.cnonce, qop: String? = this.qop): DigestCredential
fun copy(realm: String = this.realm, userName: String = this.userName, digestUri: String = this.digestUri, nonce: String = this.nonce, opaque: String? = this.opaque, nonceCount: String? = this.nonceCount, digestAlgorithm: DigestAlgorithm = this.digestAlgorithm, response: String = this.response, cnonce: String? = this.cnonce, qop: String? = this.qop, userHash: Boolean = this.userHash, charset: Charset = this.charset): DigestCredential
Link copied to clipboard
fun DigestCredential.expectedDigest(method: HttpMethod, digester: MessageDigest, userNameRealmPasswordDigest: ByteArray): ByteArray
Calculates the expected digest bytes for this DigestCredential.
fun DigestCredential.expectedDigest(method: HttpMethod, userNameRealmPasswordDigest: ByteArray, entityBodyHash: ByteArray? = null): ByteArray
Calculates the expected digest bytes for this DigestCredential per RFC 7616.
Link copied to clipboard
suspend fun DigestCredential.verifier(method: HttpMethod, userNameRealmPasswordDigest: suspend (String, String) -> ByteArray?): Boolean
Verifies that credentials are valid for a given method, and userNameRealmPasswordDigest. The algorithm from DigestCredential.algorithm is used to compute the HA1 value.
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.