Interface FederatedIdentityRepository

All Known Implementing Classes:
InMemoryFederatedIdentityRepository, JdbcFederatedIdentityRepository

public interface FederatedIdentityRepository

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.

  • Method Details

    • findUsername

      String findUsername(String provider, String subject)
      The local user this identity is tied to, or null.
    • link

      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 first
    • unlink

      boolean unlink(String provider, String subject)
      Unties the identity.
      Returns:
      whether it was tied
    • findByUsername

      List<String[]> findByUsername(String username)
      The identities tied to username, each as {provider, subject}.