DigestAuth

org.http4s.server.middleware.authentication.DigestAuth
object DigestAuth

Provides Digest Authentication from RFC 2617.

Attributes

Source
DigestAuth.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
DigestAuth.type

Members list

Type members

Classlikes

sealed trait AuthStore[F[_], A]

Attributes

Source
DigestAuth.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Md5HashedAuthStore[F, A]
class PlainTextAuthStore[F, A]
final class Md5HashedAuthStore[F[_], A](val func: String => F[Option[(A, String)]]) extends AuthStore[F, A]

Attributes

Companion
object
Source
DigestAuth.scala
Supertypes
trait AuthStore[F, A]
class Object
trait Matchable
class Any

A function mapping username to a user object and precomputed md5 hash of the username, realm, and password, or None if no user exists.

A function mapping username to a user object and precomputed md5 hash of the username, realm, and password, or None if no user exists.

More secure than PlainTextAuthStore due to only needing to store the digested hash instead of the password in plain text.

Attributes

Companion
class
Source
DigestAuth.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class PlainTextAuthStore[F[_], A](val func: String => F[Option[(A, String)]]) extends AuthStore[F, A]

Attributes

Companion
object
Source
DigestAuth.scala
Supertypes
trait AuthStore[F, A]
class Object
trait Matchable
class Any

A function mapping username to a user object and password, or None if no user exists.

A function mapping username to a user object and password, or None if no user exists.

Requires that the server can recover the password in clear text, which is _strongly_ discouraged. Please use Md5HashedAuthStore if you can.

Attributes

Companion
class
Source
DigestAuth.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Deprecated types

type AuthenticationStore[F[_], A] = String => F[Option[(A, String)]]

Attributes

Deprecated
true
Source
DigestAuth.scala

Value members

Concrete methods

Value parameters

nonceBits

The number of random bits a nonce should consist of.

nonceCleanupInterval

Interval (in milliseconds) at which stale nonces should be cleaned up.

nonceStaleTime

Amount of time (in milliseconds) after which a nonce is considered stale (i.e. not used for authentication purposes anymore).

realm

The realm used for authentication purposes.

store

A partial function mapping (realm, user) to the appropriate password.

Attributes

Source
DigestAuth.scala

Similar to apply, but exposing the underlying challenge cats.data.Kleisli instead of an entire AuthMiddleware

Similar to apply, but exposing the underlying challenge cats.data.Kleisli instead of an entire AuthMiddleware

Side-effect of running the returned task: If req contains a valid AuthorizationHeader, the corresponding nonce counter (nc) is increased.

Value parameters

nonceBits

The number of random bits a nonce should consist of.

nonceCleanupInterval

Interval (in milliseconds) at which stale nonces should be cleaned up.

nonceStaleTime

Amount of time (in milliseconds) after which a nonce is considered stale (i.e. not used for authentication purposes anymore).

realm

The realm used for authentication purposes.

store

A partial function mapping (realm, user) to the appropriate password.

Attributes

Source
DigestAuth.scala

Deprecated methods

Attributes

Deprecated
true
Source
DigestAuth.scala
def challenge[F[_], A](realm: String, store: String => F[Option[(A, String)]], nonceKeeper: NonceKeeper)(implicit F: Sync[F]): Kleisli[F, Request[F], Either[Challenge, ContextRequest[F, A]]]

Attributes

Deprecated
true
Source
DigestAuth.scala