Esempio n. 1
0
  protected void setHeaders(Invocation.Builder invocationBuilder, String token) {
    invocationBuilder.header(Headers.WOR_API_KEY_TOKEN, token);

    String clientId = Utils.getConfigValue(ConfigurationKey.URI_PREFIX);
    if (!StringUtils.isEmpty(clientId)) {
      invocationBuilder.header(Headers.API_KEY_CLIENT_ID, clientId);
    }
  }
Esempio n. 2
0
 {
   // need to force-create a transaction to get the DATA_DIRECTORY config value
   HibernateUtil.beginTransaction();
   directory =
       Paths.get(Utils.getConfigValue(ConfigurationKey.DATA_DIRECTORY), "rest-auth")
           .toFile();
   HibernateUtil.commitTransaction();
 }