Uses of Package
com.irurueta.authserver.authorization.api.web.social

Package
Description
Social login (identity brokering) through external identity providers: Google, Microsoft Entra ID, Apple and GitHub.
X.509 client certificate authentication: a certificate presented on a dedicated TLS port, or forwarded by a trusted reverse proxy in a header, signs in the user it is bound to (by the SHA-256 fingerprint of the certificate) at POST /login/x509, the form of the login page, with the CSRF token.
  • Class
    Description
    Generates the client secret Sign in with Apple requires: a JWT signed with ES256 by the key Apple issued (iss the team id, sub the client id, aud https://appleid.apple.com, header kid the key id), valid for a short time.
    Reads the private key Apple issues for Sign in with Apple (an EC P-256 key in PKCS#8 PEM form, the content of the .p8 file) from the text an environment variable holds, where line breaks are often written as a literal \n.
    Maps the settings of the enabled providers onto the client registrations Spring Security's oauth2Login needs.
    Finds the local account of a sign-in with an external provider and refuses it unless that account may sign in.
    Decides which factor a federated sign-in proved: the strong one when the provider is trusted for its multi-factor authentication (authserver.social.providers.<id>.trust-mfa) and its upstream amr contains mfa, the ordinary one otherwise.
    The user service of the providers that are plain OAuth 2.0 (GitHub), which have no ID token: the framework's service reads the profile from the provider's API, the verified primary e-mail address is read from /user/emails (through the domain port VerifiedEmailLookup, implemented by the GitHub adapter of infrastructure/github with a client generated from the contract of that GitHub operation), the account is resolved (found, linked by verified e-mail or provisioned, and refused when it may not sign in) and the principal becomes the local one, named after the account.
    The user service of the OpenID Connect providers (Google, Microsoft, Apple): the framework's service loads the user as it always does (the ID token, and the UserInfo endpoint where the provider has one), then the account is resolved (found, linked by verified e-mail or provisioned, and refused when it may not sign in) and the principal becomes the local one, named after the account.
    Maps the user an external provider described onto the user the rest of the server sees: the principal of the session, whose name is the local account's username (so it is the sub of the issued tokens, as it is for every other way of signing in), whose authorities are the account's own, and which still carries the claims of the provider (the amr among them).
    Maps the linked identities of the domain onto the DTO generated from the contract.
    What the identities page shows of a linked identity.
    Maps the linked identities of the domain onto the view model of the identities page.
    The marker a signed-in user leaves in the session when asking to link an identity of an external provider: the next sign-in with that provider, before the marker expires, links the identity to this account instead of signing anybody in.
    Keeps the link marker (PendingIdentityLink) of the explicit link flow: the identities page records it in the session before sending the browser to the provider, and the user services consume it when the provider sends the user back.
    Base of the exception handlers of the APIs that remove a sign-in method of the account (the linked identities, the bound certificates): both refuse to remove the last way to sign in and both need a recent multi-factor sign-in, so both answer those failures the same way.
    Contributes the sign-in with the configured external providers to the login page: one link per enabled provider, below the password form and the passkeys.
    Settings of the sign-in with external providers, bound once from authserver.social.* and injected wherever one is needed; an invalid value stops the application at startup.
    Settings of one provider.
  • Class
    Description
    Base of the exception handlers of the APIs that remove a sign-in method of the account (the linked identities, the bound certificates): both refuse to remove the last way to sign in and both need a recent multi-factor sign-in, so both answer those failures the same way.