object CSRF
- Source
- CSRF.scala
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- CSRF
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
- class CSRFBuilder[F[_], G[_]] extends AnyRef
- type CSRFCheck[F[_], G[_]] = (Request[G], F[Response[G]]) ⇒ F[Response[G]]
- type CSRFCheckFailed = CSRFCheckFailed.type
- abstract type CSRFToken
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val CSRFTokenLength: Int
- val SigningAlgo: String
- def apply[F[_], G[_]](key: SecretKey, headerCheck: (Request[G]) ⇒ Boolean)(implicit arg0: Sync[F], arg1: Applicative[G]): CSRFBuilder[F, G]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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
- def checkCSRFDefault[F[_], G[_]](implicit F: Sync[F]): (CSRF[F, G]) ⇒ CSRFCheck[F, G]
- def checkCSRFinHeaderAndForm[F[_], G[_]](fieldName: String, nt: ~>[G, F])(implicit arg0: Concurrent[G], F: Sync[F]): (CSRF[F, G]) ⇒ CSRFCheck[F, G]
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
defaultOriginCheck[F[_]](r: Request[F], host: String, sc: Scheme, port: Option[Int]): Boolean
Check origin matches our proposed origin.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
generateSigningKey[F[_]]()(implicit F: Sync[F]): F[SecretKey]
Generate a signing Key for the CSRF token
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
isEqual(s1: String, s2: String): Boolean
A Constant-time string equality
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def proxyOriginCheck[F[_]](r: Request[F], host: Host, xff: X-Forwarded-For): Boolean
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
tokensEqual(s1: CSRFToken, s2: CSRFToken): Boolean
A Constant-time string equality
- def unlift(s: CSRFToken): String
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- def withDefaultOriginCheck[F[_], G[_]](key: SecretKey, host: String, scheme: Scheme, port: Option[Int])(implicit arg0: Sync[F], arg1: Applicative[G]): CSRFBuilder[F, G]
- 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]
- def withGeneratedKey[F[_], G[_]](headerCheck: (Request[G]) ⇒ Boolean)(implicit arg0: Sync[F], arg1: Applicative[G]): F[CSRFBuilder[F, G]]
- def withKeyBytes[F[_], G[_]](keyBytes: Array[Byte], headerCheck: (Request[G]) ⇒ Boolean)(implicit arg0: Sync[F], arg1: Applicative[G]): F[CSRFBuilder[F, G]]
- object CSRFCheckFailed extends Exception with NoStackTrace with Product with Serializable