Class CookieSessionStore

java.lang.Object
io.vertx.mutiny.ext.web.sstore.cookie.CookieSessionStore
All Implemented Interfaces:
MutinyDelegate

public class CookieSessionStore extends Object implements MutinyDelegate
A SessionStore that uses a Cookie to store the session data. All data is stored in encrypted form using AES-256 with AES/GCM/NoPadding.

NOTE: This class has been automatically generated from the original non Mutiny-ified interface.

Author:
Paulo Lopes
See Also:
  • CookieSessionStore
  • Field Details

  • Constructor Details

    • CookieSessionStore

      public CookieSessionStore(io.vertx.ext.web.sstore.cookie.CookieSessionStore delegate)
      Create a new instance of CookieSessionStore delegating to the given (non-null) instance of CookieSessionStore.
    • CookieSessionStore

      public CookieSessionStore(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.ext.web.sstore.cookie.CookieSessionStore getDelegate()
      Get the delegate instance.

      This method returns the instance on which this shim is delegating the calls. And so, give you access to the bare API.

      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate instance
    • create

      @Deprecated public static CookieSessionStore create(Vertx vertx, String secret, io.vertx.core.buffer.Buffer salt)
      Deprecated.
      use create(Vertx, String) Creates a CookieSessionStore. This factory method is deprecated and will be removed in a future version. The salt value is ignored and should not be used. This was an artifact of the original implementation which used a different encryption scheme.
      Parameters:
      vertx - a vert.x instance
      secret - a secret to derive a secure private key
      salt - ignored
      Returns:
      the store
    • create

      public static CookieSessionStore create(Vertx vertx, String secret)
      Creates a CookieSessionStore. Cookie data will be encrypted using the given secret. The secret as the name reflects, should never leave the server, otherwise user agents could tamper with the payload. The choice of GCM, ensures that no (IV, Key) is reusable, which means that there is no need for a salt. Also encrypting the same session multiple times will render different outputs, which prevents rainbow attacks.
      Parameters:
      vertx - a vert.x instance
      secret - a secret to derive a secure private key
      Returns:
      the store
    • newInstance

      public static CookieSessionStore newInstance(io.vertx.ext.web.sstore.cookie.CookieSessionStore delegate)
      Creates a new instance of the CookieSessionStore.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object