Class SigningKeyDtoMapper

java.lang.Object
com.irurueta.authserver.authorization.api.web.keys.SigningKeyDtoMapper

@Component public class SigningKeyDtoMapper extends Object
Maps the signing keys of the domain onto the DTO generated from the contract, so a domain model is never returned from SigningKeyAdminController. Only the public half of a key is ever mapped.
  • Constructor Details

    • SigningKeyDtoMapper

      public SigningKeyDtoMapper()
  • Method Details

    • toResponse

      public SigningKeyResponse toResponse(SigningKey key)
      Maps a key to its public view.
      Parameters:
      key - the key.
      Returns:
      its public view, without the private half.
    • toResponses

      public List<SigningKeyResponse> toResponses(List<SigningKey> keys)
      Maps several keys, keeping their order.
      Parameters:
      keys - the keys.
      Returns:
      their public views.