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

org.mitre.hapifhir.examples.WellKnownEndpointController Maven / Gradle / Ivy

There is a newer version: 0.0.4
Show newest version
package org.mitre.hapifhir.examples;

import javax.servlet.http.HttpServletRequest;

import org.mitre.hapifhir.WellknownEndpointHelper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class WellKnownEndpointController {
  /**
   * Get request to support well-known endpoints for authorization metadata. See
   * http://www.hl7.org/fhir/smart-app-launch/conformance/index.html#using-well-known
   *
   * @param theRequest Incoming request, unused here
   * @return String representing json object of metadata returned at this url
   */
  @GetMapping(path = "/smart-configuration", produces = { "application/json" })
  public String getWellKnownJson(HttpServletRequest theRequest) {
    String yourTokenUrl = ""; // get by configuration here

    return WellknownEndpointHelper.getWellKnownJson(yourTokenUrl);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy