object CSRF

Source
CSRF.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CSRF
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class CSRFBuilder[F[_], G[_]] extends AnyRef
  2. type CSRFCheck[F[_], G[_]] = (Request[G], F[Response[G]]) ⇒ F[Response[G]]
  3. type CSRFCheckFailed = CSRFCheckFailed.type
  4. abstract type CSRFToken

Value Members

  1. val CSRFTokenLength: Int
  2. val SigningAlgo: String
  3. def apply[F[_], G[_]](key: SecretKey, headerCheck: (Request[G]) ⇒ Boolean)(implicit arg0: Sync[F], arg1: Applicative[G]): CSRFBuilder[F, G]
  4. def buildSigningKey[F[_]](array: Array[Byte])(implicit F: Sync[F]): F[SecretKey]

    Build a new HMACSHA1 Key for our CSRF Middleware from key bytes.

    Build a new HMACSHA1 Key for our CSRF Middleware from key bytes. This operation is unsafe, in that any amount less than 20 bytes will throw an exception when loaded into Mac. Any keys larger than 64 bytes are just hashed.

    For more information, refer to: https://tools.ietf.org/html/rfc2104#section-3

    Use for loading a key from a config file, after having generated one safely

  5. def checkCSRFDefault[F[_], G[_]](implicit F: Sync[F]): (CSRF[F, G]) ⇒ CSRFCheck[F, G]
  6. def checkCSRFinHeaderAndForm[F[_], G[_]](fieldName: String, nt: ~>[G, F])(implicit arg0: Concurrent[G], F: Sync[F]): (CSRF[F, G]) ⇒ CSRFCheck[F, G]
  7. def defaultOriginCheck[F[_]](r: Request[F], host: String, sc: Scheme, port: Option[Int]): Boolean

    Check origin matches our proposed origin.

  8. def generateSigningKey[F[_]]()(implicit F: Sync[F]): F[SecretKey]

    Generate a signing Key for the CSRF token

  9. def isEqual(s1: String, s2: String): Boolean

    A Constant-time string equality

  10. def proxyOriginCheck[F[_]](r: Request[F], host: Host, xff: X-Forwarded-For): Boolean
  11. def tokensEqual(s1: CSRFToken, s2: CSRFToken): Boolean

    A Constant-time string equality

  12. def unlift(s: CSRFToken): String
  13. def withDefaultOriginCheck[F[_], G[_]](key: SecretKey, host: String, scheme: Scheme, port: Option[Int])(implicit arg0: Sync[F], arg1: Applicative[G]): CSRFBuilder[F, G]
  14. def withDefaultOriginCheckFormAware[F[_], G[_]](fieldName: String, nt: ~>[G, F])(key: SecretKey, host: String, scheme: Scheme, port: Option[Int])(implicit arg0: Sync[F], arg1: Concurrent[G]): CSRFBuilder[F, G]
  15. def withGeneratedKey[F[_], G[_]](headerCheck: (Request[G]) ⇒ Boolean)(implicit arg0: Sync[F], arg1: Applicative[G]): F[CSRFBuilder[F, G]]
  16. def withKeyBytes[F[_], G[_]](keyBytes: Array[Byte], headerCheck: (Request[G]) ⇒ Boolean)(implicit arg0: Sync[F], arg1: Applicative[G]): F[CSRFBuilder[F, G]]
  17. object CSRFCheckFailed extends Exception with NoStackTrace with Product with Serializable

Deprecated Value Members

  1. val SHA1ByteLen: Int
    Annotations
    @deprecated
    Deprecated

    (Since version 0.20.10) Unused. Will be removed