diff options
author | Florian Reimair <florian.reimair@iaik.tugraz.at> | 2014-06-18 10:31:04 +0200 |
---|---|---|
committer | Florian Reimair <florian.reimair@iaik.tugraz.at> | 2014-06-18 10:31:04 +0200 |
commit | 9a8f7a81b57fd31616fe62cef21800b8cfb862c6 (patch) | |
tree | 64b0c348cafebf2439e99a987534404a8aab6603 /id/server/idserverlib/src/main/java | |
parent | e30ae2b3d20f1f8a9a7ba38ae778c5cd044440a9 (diff) | |
download | moa-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/server/idserverlib/src/main/java')
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() */ |