/******************************************************************************* *******************************************************************************/ package at.asitplus.eidas.specific.connector.config; import java.util.List; import org.opensaml.saml2.metadata.ContactPerson; import org.opensaml.saml2.metadata.Organization; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import at.asitplus.eidas.specific.connector.MSeIDASNodeConstants; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.exceptions.EAAFException; import at.gv.egiz.eaaf.modules.pvp2.api.IPVP2BasicConfiguration; @Service("PVPEndPointConfiguration") public class PVPEndPointConfiguration implements IPVP2BasicConfiguration { private static final Logger log = LoggerFactory.getLogger(PVPEndPointConfiguration.class); @Autowired(required=true) IConfiguration basicConfiguration; @Override public String getIDPEntityId(String authURL) throws EAAFException { return removePostFix(authURL) + MSeIDASNodeConstants.ENDPOINT_PVP_METADATA; } @Override public String getIDPSSOPostService(String authURL) throws EAAFException { return removePostFix(authURL) + MSeIDASNodeConstants.ENDPOINT_PVP_POST; } @Override public String getIDPSSORedirectService(String authURL) throws EAAFException { return removePostFix(authURL) + MSeIDASNodeConstants.ENDPOINT_PVP_REDIRECT; } @Override public Object getIDPSSOSOAPService(String extractAuthURLFromRequest) throws EAAFException { log.warn("PVP S-Profile End-Point does NOT support SOAP Binding"); return null; } @Override public List getIDPContacts() throws EAAFException { return null; } @Override public Organization getIDPOrganisation() throws EAAFException { return null; } private String removePostFix(String url) { if (url != null && url.endsWith("/")) return url.substring(0, url.length() - 1); else return url; } }