Class RedisSessionDao

java.lang.Object
se.swedenconnect.bankid.idp.authn.session.RedisSessionDao
All Implemented Interfaces:
SessionDao

public class RedisSessionDao extends Object implements SessionDao
Redis implementation of the SessionDao interface.
Author:
Martin Lindström, Felix Hellman
  • Constructor Details

    • RedisSessionDao

      public RedisSessionDao(RedissonClient client)
      Constructor.
      Parameters:
      client - the Redis client
  • Method Details

    • write

      public void write(String key, Object value, jakarta.servlet.http.HttpServletRequest request)
      Writes object value under the key key.
      Specified by:
      write in interface SessionDao
      Parameters:
      key - the object key
      value - the object
      request - the HTTP servlet request
    • read

      public <T> T read(String key, Class<T> tClass, jakarta.servlet.http.HttpServletRequest request)
      Reads the object identified by key of type tClass.
      Specified by:
      read in interface SessionDao
      Type Parameters:
      T - the type
      Parameters:
      key - the object key
      tClass - the type of the object to read
      request - the HTTP servlet request
      Returns:
      the object, or null if none is available
    • remove

      public void remove(String key, jakarta.servlet.http.HttpServletRequest request)
      Removes the object identified by key.
      Specified by:
      remove in interface SessionDao
      Parameters:
      key - the object key
      request - the HTTP servlet request