Class PersistentRememberMeToken

java.lang.Object
com.codename1.backend.security.rememberme.PersistentRememberMeToken

public final class PersistentRememberMeToken extends Object
One remembered sign-in, as the server keeps it: whose it is, the series the cookie names, the hash of the token the cookie must carry next, and when it was last used.
  • Constructor Details

    • PersistentRememberMeToken

      public PersistentRememberMeToken(String username, String series, String tokenHash, long lastUsed)
      Parameters:
      tokenHash - the SHA-256 of the token, in hex: the token itself is only ever in the cookie
      lastUsed - epoch milliseconds
    • PersistentRememberMeToken

      public PersistentRememberMeToken(String username, String series, String tokenHash, long lastUsed, String previousTokenHash)
      Includes the token replaced at lastUsed, for a bounded concurrent-use grace.
  • Method Details

    • getUsername

      public String getUsername()
    • getSeries

      public String getSeries()
    • getTokenHash

      public String getTokenHash()
    • getLastUsed

      public long getLastUsed()
    • getPreviousTokenHash

      public String getPreviousTokenHash()
      The hash replaced at getLastUsed(), or null before the first rotation.