class JWTAuthOptionsFactory {

  public JWTAuthOptions createForExternalPublicKey(final File externalPublicKeyFile) {
    final byte[] externalJwtPublicKey = readPublicKey(externalPublicKeyFile);
    final String base64EncodedPublicKey = Base64.getEncoder().encodeToString(externalJwtPublicKey);
    return new JWTAuthOptions()
        .setPermissionsClaimKey(PERMISSIONS)
        .addPubSecKey(
            new PubSecKeyOptions().setAlgorithm(ALGORITHM).setPublicKey(base64EncodedPublicKey));
  }

}