class KeycloakSigningKeyResolver extends SigningKeyResolverAdapter {

  @Override
  public Key resolveSigningKey(JwsHeader header, String plaintext) {
    if (MACHINE_TOKEN_KIND.equals(header.get("kind"))) {
      throw new MachineTokenJwtException(); // machine token, doesn't need to verify
    }
    return getJwtPublicKey(header);
  }

  @Inject  KeycloakSigningKeyResolver(JwkProvider jwkProvider);

}