Helpful
    Preparing search index...

    Represents a builder for an IZCookie object.

    Index

    Constructors

    Properties

    immortal: () => this = ...

    Removes the cookie expiration.

    Type Declaration

      • (): this
      • Returns this

        This object.

    lax: (...args: []) => ZCookieBuilder = ...

    Sets the same site policy to 'lax'

    Type Declaration

    strict: (...args: []) => ZCookieBuilder = ...

    Sets the same site polity to 'strict'

    Type Declaration

    MillisecondsOneDay: 86400000

    Methods

    • Sets the same site policy to 'none' and turns on the secure flag.

      Returns this

      This object.

    • Creates a token based authentication cookie.

      Parameters

      • Optionaltoken: string

        The token value for the cookie. You can leave this as undefined to set it later.

      Returns this

      This object.

    • Sets the cookie domain.

      Parameters

      • val: string | undefined

        The value to set.

      Returns this

      This object.

    • Sets the cookie expiration date.

      Parameters

      • val: string | Date | undefined

        The value to set.

      Returns this

      This object.

    • Sets the cookie expiration date to one day from the moment this is invoked.

      Returns this

      This object.

    • Sets the cookie http only flag.

      Parameters

      • val: boolean = true

        The value to set.

      Returns this

      This object.

    • Sets the cookie name.

      Parameters

      • val: string

        The value to set.

      Returns this

      This object.

    • Sets the cookie same site policy.

      Parameters

      • val: "lax" | "strict" | "none"

        The value to set.

      Returns this

      This object.

    • Sets the cookie secure flag.

      Parameters

      • val: boolean = true

        The value to set.

      Returns this

      This object.

    • Sets the cookie value.

      Parameters

      • val: string

        The value to set.

      Returns this

      This object.