Interface VerifiedEmailLookup
- All Known Implementing Classes:
GitHubVerifiedEmailLookup
public interface VerifiedEmailLookup
Port that asks an external provider for the verified primary e-mail address of the user who just signed in, for a
provider whose profile does not vouch for its e-mail address (GitHub). It never returns
null and never lets
a transport failure escape: a provider that cannot be reached, refuses the token or answers something unreadable
means there is no verified address.-
Method Summary
Modifier and TypeMethodDescriptionverifiedPrimaryEmail(String userInfoUri, String accessToken) Finds the address that the provider marks as both primary and verified.
-
Method Details
-
verifiedPrimaryEmail
Finds the address that the provider marks as both primary and verified.- Parameters:
userInfoUri- URI of the provider's user endpoint, as the client registration configures it; the addresses are read from the same API.accessToken- access token of the user, issued by the provider during the sign-in.- Returns:
- the address, or an empty optional when there is none or the provider cannot tell.
-