Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class InMemoryFederatedIdentityRepository
- Object
- InMemoryFederatedIdentityRepository
ImplementsFederatedIdentityRepository
Identities kept in this process: gone when it stops, and unknown to any
other. For development and tests; see
JdbcFederatedIdentityRepository.Constructors
public InMemoryFederatedIdentityRepository() |
Methods
public synchronized String findUsername(String provider, String subject) | The local user this identity is tied to, or null. |
public synchronized String link(String provider, String subject, String username) | Ties the identity to username, unless it is tied already. |
public synchronized boolean unlink(String provider, String subject) | Unties the identity. |
public synchronized List<String[]> findByUsername(String username) | The identities tied to username, each as {provider, subject}. |
Inherited methods
Constructor details
InMemoryFederatedIdentityRepository
public InMemoryFederatedIdentityRepository()Method details
findUsername
public synchronized String findUsername(String provider, String subject)The local user this identity is tied to, or null.
link
public synchronized 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 synchronized boolean unlink(String provider, String subject)Unties the identity.
Returns
whether it was tied
findByUsername
public synchronized List<String[]> findByUsername(String username)The identities tied to
username, each as {provider, subject}.