Class GitHubEmailMapper
java.lang.Object
com.irurueta.authserver.authorization.infrastructure.github.GitHubEmailMapper
Maps the e-mail addresses GitHub lists onto the one address the domain wants: the address GitHub marks as both
primary and verified. A verified address that is not the primary one, or a primary one that is not verified, does
not count.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionverifiedPrimary(List<Email> emails) Picks the verified primary address.
-
Constructor Details
-
GitHubEmailMapper
public GitHubEmailMapper()
-
-
Method Details
-
verifiedPrimary
Picks the verified primary address.- Parameters:
emails- the addresses GitHub answered, possiblynullfor an empty body.- Returns:
- the address, or an empty optional when none is both primary and verified.
-