Interface ExternalIdFactory
- All Known Implementing Classes:
ExternalIdFactoryNoteDbImpl
public interface ExternalIdFactory
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Whether thisExternalIdFactory
supports passwords.create
(ExternalId.Key key, Account.Id accountId) Creates an external ID.create
(ExternalId.Key key, Account.Id accountId, String email, String hashedPassword) Creates an external ID.create
(String scheme, String id, Account.Id accountId) Creates an external ID.Creates an external ID.createEmail
(Account.Id accountId, String email) Creates an external ID using the `mailto`-scheme.createUsername
(String id, Account.Id accountId, String plainPassword) Create a external ID for a username (scheme "username").createWithEmail
(ExternalId.Key key, Account.Id accountId, String email) Creates an external ID with an email.createWithEmail
(String scheme, String id, Account.Id accountId, String email) Creates an external ID with an email.createWithPassword
(ExternalId.Key key, Account.Id accountId, String email, String plainPassword) Creates an external ID adding a hashed password computed from a plain password.
-
Method Details
-
create
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 belongsemail
- the email of the external ID, may benull
hashedPassword
- the hashed password of the external ID, may benull
- Returns:
- the created external ID
-
create
Creates an external ID.- Parameters:
key
- the external Id keyaccountId
- the ID of the account to which the external ID belongs- Returns:
- the created external ID
-
create
Creates an external ID.- Parameters:
key
- the external Id keyaccountId
- the ID of the account to which the external ID belongsemail
- the email of the external ID, may benull
hashedPassword
- the hashed password of the external ID, may benull
- 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 keyaccountId
- the ID of the account to which the external ID belongsemail
- the email of the external ID, may benull
plainPassword
- the plain HTTP password, may benull
- Returns:
- the created external ID
-
createUsername
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 belongsplainPassword
- the plain HTTP password, may benull
- Returns:
- the created external ID
-
createWithEmail
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 belongsemail
- the email of the external ID, may benull
- Returns:
- the created external ID
-
createWithEmail
Creates an external ID with an email.- Parameters:
key
- the external Id keyaccountId
- the ID of the account to which the external ID belongsemail
- the email of the external ID, may benull
- Returns:
- the created external ID
-
createEmail
Creates an external ID using the `mailto`-scheme.- Parameters:
accountId
- the ID of the account to which the external ID belongsemail
- the email of the external ID, may benull
- Returns:
- the created external ID
-
arePasswordsAllowed
boolean arePasswordsAllowed()Whether thisExternalIdFactory
supports passwords.
-