aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-26 09:34:59 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-02-26 15:07:58 +0100
commit1aa6fd1a5b007a9c234e096e6d145cb0235cfd70 (patch)
treeb6e7e285fcb72de1f470d2531eab04ce2015061d /id/server/idserverlib/src
parent3640475187ba8f2bfd4b72b2e6b7fa105432f889 (diff)
downloadmoa-id-spss-1aa6fd1a5b007a9c234e096e6d145cb0235cfd70.tar.gz
moa-id-spss-1aa6fd1a5b007a9c234e096e6d145cb0235cfd70.tar.bz2
moa-id-spss-1aa6fd1a5b007a9c234e096e6d145cb0235cfd70.zip
init eHvd AP Plugin
Diffstat (limited to 'id/server/idserverlib/src')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java8
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/EHvdAttributeProviderPlugin.java50
2 files changed, 55 insertions, 3 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
index 98d354e8a..23edf69f9 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AttributeProviderFactory.java
@@ -18,6 +18,7 @@ public class AttributeProviderFactory {
public static List<String> getAvailablePlugins() {
List<String> result = new ArrayList<String>();
result.add("StorkAttributeRequestProvider");
+ result.add("EHvdAttributeProvider");
return result;
}
@@ -31,10 +32,11 @@ public class AttributeProviderFactory {
* @return the attribute provider
*/
public static AttributeProvider create(String shortname, String url) {
- switch (shortname) {
- case "StorkAttributeRequestProvider":
+ if (shortname.equals("StorkAttributeRequestProvider")) {
return new StorkAttributeRequestProvider(url);
- default:
+ } else if(shortname.equals("EHvdAttributeProvider")) {
+ return new EHvdAttributeProviderPlugin(url);
+ } else {
return null;
}
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/EHvdAttributeProviderPlugin.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/EHvdAttributeProviderPlugin.java
new file mode 100644
index 000000000..8783026c2
--- /dev/null
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/EHvdAttributeProviderPlugin.java
@@ -0,0 +1,50 @@
+package at.gv.egovernment.moa.id.protocols.stork2;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import at.gv.egovernment.moa.id.auth.exception.MOAIDException;
+import at.gv.egovernment.moa.id.config.auth.OAAuthParameter;
+import eu.stork.peps.auth.commons.IPersonalAttributeList;
+import eu.stork.peps.auth.commons.PersonalAttribute;
+
+/**
+ * Fetches the attribute IsHealthcareProfessional from the BAGDAD SOAP service
+ */
+public class EHvdAttributeProviderPlugin implements AttributeProvider {
+
+ public EHvdAttributeProviderPlugin(String url) {
+ // TODO Auto-generated constructor stub
+ }
+
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.protocols.stork2.AttributeProvider#acquire(eu.stork.peps.auth.commons.PersonalAttribute)
+ */
+ @Override
+ public IPersonalAttributeList acquire(PersonalAttribute attributes)
+ throws UnsupportedAttributeException,
+ ExternalAttributeRequestRequiredException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.protocols.stork2.AttributeProvider#performRedirect(java.lang.String, java.lang.String, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, at.gv.egovernment.moa.id.config.auth.OAAuthParameter)
+ */
+ @Override
+ public void performRedirect(String url, String citizenCountyCode,
+ HttpServletRequest req, HttpServletResponse resp,
+ OAAuthParameter oaParam) throws MOAIDException {
+ // there is no redirect required
+ }
+
+ /* (non-Javadoc)
+ * @see at.gv.egovernment.moa.id.protocols.stork2.AttributeProvider#parse(javax.servlet.http.HttpServletRequest)
+ */
+ @Override
+ public IPersonalAttributeList parse(HttpServletRequest httpReq)
+ throws UnsupportedAttributeException, MOAIDException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}