Interface HonoPasswordEncoder

  • All Known Implementing Classes:
    SpringBasedHonoPasswordEncoder

    public interface HonoPasswordEncoder
    A helper for encoding and matching passwords against credentials managed by a Hono Credentials service implementation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.vertx.core.json.JsonObject encode​(String rawPassword)
      Computes a hash for a raw password.
      boolean matches​(String rawPassword, io.vertx.core.json.JsonObject secret)
      Matches a given password against credentials on record.
    • Method Detail

      • encode

        io.vertx.core.json.JsonObject encode​(String rawPassword)
        Computes a hash for a raw password.
        Parameters:
        rawPassword - The clear text password to encode.
        Returns:
        A secret as defined by Hono's hashed-password credentials type. The secret contains the name of the hash function, (optional) salt and the password hash.
      • matches

        boolean matches​(String rawPassword,
                        io.vertx.core.json.JsonObject secret)
        Matches a given password against credentials on record.
        Parameters:
        rawPassword - The clear text password to match.
        secret - The hashed-password secret to match against.
        Returns:
        true if the password matches.