Interface ExternalIdFactory

All Known Implementing Classes:
ExternalIdFactoryNoteDbImpl

public interface ExternalIdFactory
  • Method Details

    • create

      ExternalId create(String scheme, String id, Account.Id accountId)
      Creates an external ID.
      Parameters:
      scheme - the scheme name, must not contain colons (':'). E.g. ExternalId.SCHEME_USERNAME.
      id - the external ID, must not contain colons (':')
      accountId - the ID of the account to which the external ID belongs
      Returns:
      the created external ID
    • create

      ExternalId create(String scheme, String id, Account.Id accountId, String email, String hashedPassword)
      Creates an external ID.
      Parameters:
      scheme - the scheme name, must not contain colons (':'). E.g. ExternalId.SCHEME_USERNAME.
      id - the external ID, must not contain colons (':')
      accountId - the ID of the account to which the external ID belongs
      email - the email of the external ID, may be null
      hashedPassword - the hashed password of the external ID, may be null
      Returns:
      the created external ID
    • create

      ExternalId create(ExternalId.Key key, Account.Id accountId)
      Creates an external ID.
      Parameters:
      key - the external Id key
      accountId - the ID of the account to which the external ID belongs
      Returns:
      the created external ID
    • create

      ExternalId create(ExternalId.Key key, Account.Id accountId, String email, String hashedPassword)
      Creates an external ID.
      Parameters:
      key - the external Id key
      accountId - the ID of the account to which the external ID belongs
      email - the email of the external ID, may be null
      hashedPassword - the hashed password of the external ID, may be null
      Returns:
      the created external ID
    • createWithPassword

      ExternalId createWithPassword(ExternalId.Key key, Account.Id accountId, String email, String plainPassword)
      Creates an external ID adding a hashed password computed from a plain password.
      Parameters:
      key - the external Id key
      accountId - the ID of the account to which the external ID belongs
      email - the email of the external ID, may be null
      plainPassword - the plain HTTP password, may be null
      Returns:
      the created external ID
    • createUsername

      ExternalId createUsername(String id, Account.Id accountId, String plainPassword)
      Create a external ID for a username (scheme "username").
      Parameters:
      id - the external ID, must not contain colons (':')
      accountId - the ID of the account to which the external ID belongs
      plainPassword - the plain HTTP password, may be null
      Returns:
      the created external ID
    • createWithEmail

      ExternalId createWithEmail(String scheme, String id, Account.Id accountId, String email)
      Creates an external ID with an email.
      Parameters:
      scheme - the scheme name, must not contain colons (':'). E.g. ExternalId.SCHEME_USERNAME.
      id - the external ID, must not contain colons (':')
      accountId - the ID of the account to which the external ID belongs
      email - the email of the external ID, may be null
      Returns:
      the created external ID
    • createWithEmail

      ExternalId createWithEmail(ExternalId.Key key, Account.Id accountId, String email)
      Creates an external ID with an email.
      Parameters:
      key - the external Id key
      accountId - the ID of the account to which the external ID belongs
      email - the email of the external ID, may be null
      Returns:
      the created external ID
    • createEmail

      ExternalId createEmail(Account.Id accountId, String email)
      Creates an external ID using the `mailto`-scheme.
      Parameters:
      accountId - the ID of the account to which the external ID belongs
      email - the email of the external ID, may be null
      Returns:
      the created external ID
    • arePasswordsAllowed

      boolean arePasswordsAllowed()
      Whether this ExternalIdFactory supports passwords.