All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.mdsol.mauth.test.utils.FixturesLoader Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package com.mdsol.mauth.test.utils;

import org.apache.commons.io.IOUtils;

import java.io.IOException;
import java.nio.charset.Charset;

public class FixturesLoader {

  public static String getPublicKey() {
    try {
      return IOUtils.toString(FixturesLoader.class.getResourceAsStream("/keys/fake_publickey.pem"), Charset.defaultCharset());
    } catch (IOException ex) {
      throw new IllegalStateException("Unable to load the public key.", ex);
    }
  }

  public static String getPrivateKey() {
    try {
      return IOUtils.toString(FixturesLoader.class.getResourceAsStream("/keys/fake_privatekey.pem"), Charset.defaultCharset());
    } catch (IOException ex) {
      throw new IllegalStateException("Unable to load the private key.", ex);
    }
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy