data class DigestCredential : Credential
Represents Digest credentials
For details see RFC2617
DigestCredential(realm: String, userName: String, digestUri: String, nonce: String, opaque: String?, nonceCount: String?, algorithm: String?, response: String, cnonce: String?, qop: String?)
Represents Digest credentials |
val algorithm: String?
digest algorithm name |
|
val cnonce: String?
must be sent if qop is specified and must be |
|
val digestUri: String
may be an absolute URI or |
|
val nonce: String |
|
val nonceCount: String?
must be sent if qop is specified and must be |
|
val opaque: String?
a string of data that is passed through unchanged |
|
val qop: String?
quality of protection sign |
|
val realm: String
digest auth realm |
|
val response: String
consist of 32 hex digits (digested password and other fields as per RFC) |
|
val userName: String |
fun DigestCredential.expectedDigest(method: HttpMethod, digester: MessageDigest, userNameRealmPasswordDigest: ByteArray): ByteArray
Calculates expected digest bytes for this DigestCredential |
|
suspend fun DigestCredential.verifier(method: HttpMethod, digester: MessageDigest, userNameRealmPasswordDigest: suspend (String, String) -> ByteArray?): Boolean
Verifies credentials are valid for given method and digester and userNameRealmPasswordDigest |