Skip to content

Commit

Permalink
uri: String -> Uri
Browse files Browse the repository at this point in the history
  • Loading branch information
blast-hardcheese committed Mar 21, 2022
1 parent a31c5d6 commit 74638e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Expand Up @@ -233,7 +233,6 @@ object DigestAuth {
F.pure(BadParameters)
} else {
val method = req.method.toString
val uri = req.uri.toString

if (!params.get("realm").contains(realm)) {
F.pure(BadParameters)
Expand All @@ -255,7 +254,7 @@ object DigestAuth {
params("username"),
realm,
password,
uri,
req.uri,
nonce,
nc,
params("cnonce"),
Expand All @@ -274,7 +273,7 @@ object DigestAuth {
.computeHashedResponse(
method,
ha1Hash,
uri,
req.uri,
nonce,
nc,
params("cnonce"),
Expand Down
Expand Up @@ -43,13 +43,13 @@ private[authentication] object DigestUtil {
def computeHashedResponse[F[_]: Monad: Hash](
method: String,
ha1: String,
uri: String,
uri: Uri,
nonce: String,
nc: String,
cnonce: String,
qop: String,
): F[String] = for {
ha2str <- (method + ":" + uri).pure[F]
ha2str <- (method + ":" + uri.toString()).pure[F]
ha2 <- md5(ha2str)
respstr = ha1 + ":" + nonce + ":" + nc + ":" + cnonce + ":" + qop + ":" + ha2
result <- md5(respstr)
Expand Down Expand Up @@ -84,7 +84,7 @@ private[authentication] object DigestUtil {
username: String,
realm: String,
password: String,
uri: String,
uri: Uri,
nonce: String,
nc: String,
cnonce: String,
Expand Down

0 comments on commit 74638e5

Please sign in to comment.