aboutsummaryrefslogtreecommitdiff
path: root/id/oa/src
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2019-09-09 12:27:09 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2019-09-09 12:27:09 +0200
commitabc2537a4d2e6d6a06b3b24d7268daf379aa949b (patch)
tree95794df1b9aa7e8f0176fcf21a532d28dd7c7256 /id/oa/src
parent394e5228bac26ecf02b5aca4f0db27d05ea0a0cd (diff)
downloadmoa-id-spss-abc2537a4d2e6d6a06b3b24d7268daf379aa949b.tar.gz
moa-id-spss-abc2537a4d2e6d6a06b3b24d7268daf379aa949b.tar.bz2
moa-id-spss-abc2537a4d2e6d6a06b3b24d7268daf379aa949b.zip
read requested LoA from configuration
Diffstat (limited to 'id/oa/src')
-rw-r--r--id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java5
-rw-r--r--id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/Authenticate.java12
2 files changed, 15 insertions, 2 deletions
diff --git a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
index 8ada01cb6..d6c14fd07 100644
--- a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
+++ b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/Configuration.java
@@ -187,6 +187,11 @@ public class Configuration {
return Boolean.parseBoolean(props.getProperty("general.login.pvp2.req.set.authncontextclassref", "true"));
}
+ public String getAuthnContextClassRefValue() {
+ return props.getProperty("general.login.pvp2.req.authncontextclassref.value");
+
+ }
+
public String getScopeRequesterId() {
return props.getProperty("general.login.pvp2.sp.requesterId");
}
diff --git a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/Authenticate.java b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/Authenticate.java
index 0671b8c14..4e8e12499 100644
--- a/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/Authenticate.java
+++ b/id/oa/src/main/java/at/gv/egovernment/moa/id/demoOA/servlet/pvp2/Authenticate.java
@@ -191,8 +191,16 @@ public class Authenticate extends HttpServlet {
RequestedAuthnContext reqAuthContext =
SAML2Utils.createSAMLObject(RequestedAuthnContext.class);
AuthnContextClassRef authnClassRef =
- SAML2Utils.createSAMLObject(AuthnContextClassRef.class);
- authnClassRef.setAuthnContextClassRef("http://www.stork.gov.eu/1.0/citizenQAALevel/4");
+ SAML2Utils.createSAMLObject(AuthnContextClassRef.class);
+
+ if (MiscUtil.isNotEmpty(config.getAuthnContextClassRefValue())) {
+ authnClassRef.setAuthnContextClassRef(config.getAuthnContextClassRefValue());
+
+ } else {
+ authnClassRef.setAuthnContextClassRef("http://www.stork.gov.eu/1.0/citizenQAALevel/4");
+
+ }
+
reqAuthContext.setComparison(AuthnContextComparisonTypeEnumeration.MINIMUM);
reqAuthContext.getAuthnContextClassRefs().add(authnClassRef);
authReq.setRequestedAuthnContext(reqAuthContext);