Class IdentityDtoMapper

java.lang.Object
com.irurueta.authserver.authorization.api.web.social.IdentityDtoMapper

@Component public class IdentityDtoMapper extends Object
Maps the linked identities of the domain onto the DTO generated from the contract. The subject the provider assigned to the user, and the account the identity belongs to, are not part of the contract and never leave the server.
  • Constructor Details

    • IdentityDtoMapper

      public IdentityDtoMapper()
  • Method Details

    • toResponse

      public Identity toResponse(FederatedIdentity identity)
      Maps an identity to its public view.
      Parameters:
      identity - the identity.
      Returns:
      its public view.
    • toResponses

      public List<Identity> toResponses(List<FederatedIdentity> identities)
      Maps several identities, keeping their order.
      Parameters:
      identities - the identities.
      Returns:
      their public views.