object CookieParser extends Object with CookieParser
CookieParser Singleton
- Annotations
- @native() @JSImport( "cookie-parser" , JSImport.Namespace )
- Alphabetic
- By Inheritance
- CookieParser
- CookieParser
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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
-
def
JSONCookie(str: String): UndefOr[Any]
Parse a cookie value as a JSON cookie.
Parse a cookie value as a JSON cookie. This will return the parsed JSON value if it was a JSON cookie, otherwise it will return the passed value.
- str
the given cookie value
- returns
the parsed JSON value if it was a JSON cookie, otherwise it will return the passed value
- Definition Classes
- CookieParser
-
def
JSONCookies(cookies: Any): Any
Given an object, this will iterate over the keys and call JSONCookie on each value.
Given an object, this will iterate over the keys and call JSONCookie on each value. This will return the same object passed in.
- cookies
the given object
- returns
the same object passed in
- Definition Classes
- CookieParser
-
def
apply(secret: |[String, Array[String]] = js.native, options: |[DeserializationOptions, RawOptions] = js.native): Function3[Request, Response, Function, Any]
- secret
a string or array used for signing cookies. This is optional and if not specified, will not parse signed cookies. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
- options
an object that is passed to cookie.parse as the second option.
- returns
a middleware function
- Definition Classes
- CookieParser
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
-
def
signedCookie(str: String, secret: |[String, Array[String]]): Any
Parse a cookie value as a signed cookie.
Parse a cookie value as a signed cookie. This will return the parsed unsigned value if it was a signed cookie and the signature was valid, otherwise it will return the passed value.
- str
a cookie value
- secret
can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
- returns
the passed value.
- Definition Classes
- CookieParser
-
def
signedCookies(cookies: Any, secret: |[String, Array[String]]): Any
Given an object, this will iterate over the keys and check if any value is a signed cookie.
Given an object, this will iterate over the keys and check if any value is a signed cookie. If it is a signed cookie and the signature is valid, the key will be deleted from the object and added to the new object that is returned.
- cookies
an object
- secret
can be an array or string. If a string is provided, this is used as the secret. If an array is provided, an attempt will be made to unsign the cookie with each secret in order.
- returns
the new object
- Definition Classes
- CookieParser
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toLocaleString(): String
- Definition Classes
- Object
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
valueOf(): Any
- Definition Classes
- Object
-
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( ... )