aboutsummaryrefslogtreecommitdiff
path: root/id
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-06-18 10:31:04 +0200
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-06-18 10:31:04 +0200
commit9a8f7a81b57fd31616fe62cef21800b8cfb862c6 (patch)
tree64b0c348cafebf2439e99a987534404a8aab6603 /id
parente30ae2b3d20f1f8a9a7ba38ae778c5cd044440a9 (diff)
downloadmoa-id-spss-9a8f7a81b57fd31616fe62cef21800b8cfb862c6.tar.gz
moa-id-spss-9a8f7a81b57fd31616fe62cef21800b8cfb862c6.tar.bz2
moa-id-spss-9a8f7a81b57fd31616fe62cef21800b8cfb862c6.zip
fixed NullPointerEx on STORK2 AttrQueryRequest
Diffstat (limited to 'id')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java2
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKRequest.java12
2 files changed, 13 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
index 9a40e0b72..8e66db384 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/AuthenticationRequest.java
@@ -75,7 +75,7 @@ public class AuthenticationRequest implements IAction {
this.authData = authData;
- if ((req instanceof MOASTORKRequest) && ((MOASTORKRequest) req).getStorkAuthnRequest().getCitizenCountryCode().equals("AT")) {
+ if ((req instanceof MOASTORKRequest) && ((MOASTORKRequest) req).getCitizenCountryCode().equals("AT")) {
this.moaStorkRequest = (MOASTORKRequest) req;
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKRequest.java
index 0f160eed6..076139018 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKRequest.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MOASTORKRequest.java
@@ -193,6 +193,18 @@ public class MOASTORKRequest extends RequestImpl {
return this.storkAuthnRequest.getAssertionConsumerServiceURL();
}
+ /**
+ * Gets the citizen country code.
+ *
+ * @return the citizen country code
+ */
+ public String getCitizenCountryCode() {
+ if(isAttrRequest())
+ return this.storkAttrQueryRequest.getCitizenCountryCode();
+ else
+ return this.storkAuthnRequest.getCitizenCountryCode();
+ }
+
/* (non-Javadoc)
* @see at.gv.egovernment.moa.id.moduls.IRequest#getRequestedIDP()
*/