Object/Trait

io.scalajs.npm.cookieparser

CookieParser

Related Docs: trait CookieParser | package cookieparser

Permalink

object CookieParser extends Object with CookieParser

CookieParser Singleton

Annotations
@native() @JSImport( "cookie-parser" , JSImport.Namespace )
Linear Supertypes
CookieParser, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CookieParser
  2. CookieParser
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def JSONCookie(str: String): UndefOr[Any]

    Permalink

    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
  5. def JSONCookies(cookies: Any): Any

    Permalink

    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
  6. def apply(secret: |[String, Array[String]] = js.native, options: |[DeserializationOptions, RawOptions] = js.native): Function3[Request, Response, Function, Any]

    Permalink

    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
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  14. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  21. def signedCookie(str: String, secret: |[String, Array[String]]): Any

    Permalink

    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
  22. def signedCookies(cookies: Any, secret: |[String, Array[String]]): Any

    Permalink

    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
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from CookieParser

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped