diff options
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() */ |