Commit 781bff81 authored by Gradl, Tobias's avatar Gradl, Tobias
Browse files

11: Reorganize and refactor core

Task-Url: #11
parent 250d3274
Pipeline #17794 passed with stage
in 1 minute and 54 seconds
package eu.dariah.de.dariahsp.controller;
package eu.dariah.de.dariahsp.web.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
......@@ -9,11 +9,11 @@ import org.springframework.web.bind.annotation.ResponseBody;
import eu.dariah.de.dariahsp.error.NotFoundException;
import eu.dariah.de.dariahsp.error.SAML2MetadataNotFoundException;
import eu.dariah.de.dariahsp.metadata.MetadataHelper;
import eu.dariah.de.dariahsp.helpers.SAMLMetadataHelper;
@Controller
public class MetadataController {
@Autowired private MetadataHelper metadataHelper;
public class SAMLMetadataController {
@Autowired private SAMLMetadataHelper metadataHelper;
@GetMapping(value = {"/saml/metadata", "/saml/metadata/{action}"}, produces = MediaType.APPLICATION_XML_VALUE)
public @ResponseBody String getMetadata(@PathVariable(required=false) String action) {
......
package eu.dariah.de.dariahsp.model.web;
package eu.dariah.de.dariahsp.web.model;
import java.util.Set;
......@@ -13,5 +13,4 @@ public class AuthPojo {
private String displayName;
private String language;
private Set<String> roles;
private Set<String> externalRoles;
}
......@@ -16,12 +16,12 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import eu.dariah.de.dariahsp.config.SecurityConfig;
import eu.dariah.de.dariahsp.controller.MetadataController;
import eu.dariah.de.dariahsp.error.AuthenticatorNotAvailable;
import eu.dariah.de.dariahsp.web.AuthInfoHelper;
import eu.dariah.de.dariahsp.web.controller.SAMLMetadataController;
@Controller
public class SampleController extends MetadataController {
public class SampleController extends SAMLMetadataController {
private static String INDEX_PAGE = "index";
@Autowired private SecurityConfig securityConfig;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment