use of org.wso2.carbon.identity.webfinger.builders.WebFingerResponseBuilder in project identity-inbound-auth-oauth by wso2-extensions.
the class WebFingerServlet method getOIDProviderIssuer.
public void getOIDProviderIssuer(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws IOException {
WebFingerProcessor processor = WebFingerServiceComponentHolder.getWebFingerProcessor();
String response = "";
try {
WebFingerResponseBuilder webFingerResponseBuilder = new JSONResponseBuilder();
response = webFingerResponseBuilder.getOIDProviderIssuerString(processor.getResponse(httpServletRequest));
} catch (WebFingerEndpointException e) {
httpServletResponse.setStatus(processor.handleError(e));
return;
} catch (ServerConfigurationException e) {
log.error("Server Configuration error occurred.", e);
httpServletResponse.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
return;
}
httpServletResponse.setContentType(WebFingerConstants.RESPONSE_CONTENT_TYPE);
PrintWriter out = httpServletResponse.getWriter();
out.print(response);
}
Aggregations