Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public interface FederatedIdentityRepository
Known subtypesInMemoryFederatedIdentityRepository, JdbcFederatedIdentityRepository
Which local user each identity at a provider is: the pairs of a registration’s id and the provider’s subject, each tied to one user name.
A provider’s subject, not an email address, is what identifies a returning user: an address can change hands, and a subject does not.
Methods
public abstract String findUsername(String provider, String subject) | The local user this identity is tied to, or null. |
public abstract String link(String provider, String subject, String username) | Ties the identity to username, unless it is tied already. |
public abstract boolean unlink(String provider, String subject) | Unties the identity. |
public abstract List<String[]> findByUsername(String username) | The identities tied to username, each as {provider, subject}. |
Method details
findUsername
public abstract String findUsername(String provider, String subject)The local user this identity is tied to, or null.
link
public abstract String link(String provider, String subject, String username)Ties the identity to
username, unless it is tied already.Returns
the user the identity is tied to once this returns:
username,
or the one another request tied it to firstunlink
public abstract boolean unlink(String provider, String subject)Unties the identity.
Returns
whether it was tied
findByUsername
public abstract List<String[]> findByUsername(String username)The identities tied to
username, each as {provider, subject}.