From ad0a0adca1ab94f42ed65d9ccf2c68e283a728aa Mon Sep 17 00:00:00 2001 From: Bojan Suzic Date: Tue, 18 Feb 2014 18:13:19 +0100 Subject: saml point --- .../id/protocols/stork2/AuthenticationRequest.java | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment') 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 55d5f3626..2debe7452 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 @@ -97,11 +97,30 @@ public class AuthenticationRequest implements IAction { authnResponse.setCountry("AT"); + IPersonalAttributeList attrLst = ((STORKAuthnRequestDEL)req).getStorkAuthnRequest().getPersonalAttributeList(); + Logger.info("Found number of authnreq personal attributes: " + attrLst.size()); + + try { + for (PersonalAttribute personalAttribute : attrLst) { + Logger.info("Personal authnreq attribute found: " + personalAttribute.getName() + " status: " + personalAttribute.getStatus() + " isrequired: " + personalAttribute.isRequired() + " type: " + personalAttribute.getType()); + + if (personalAttribute.getValue().size() > 0) { + for (String value : personalAttribute.getValue()) { + Logger.info(" Value found: " + value); + } + } + } + } catch (Exception e) { + Logger.error("Exception, attributes: " + e.getMessage()); + } + + try { + IPersonalAttributeList moaAttrList = moasession.getStorkAttributes(); + Logger.info("Found number of moa personal attributes: " + moasession.getStorkAttributes().size()); - IPersonalAttributeList moaAttrList = moasession.getStorkAttributes(); - for (PersonalAttribute personalAttribute : moaAttrList) { + for (PersonalAttribute personalAttribute : moaAttrList) { Logger.info("Personal attribute found: " + personalAttribute.getName() + personalAttribute.getStatus()); if (personalAttribute.getValue().size() > 0) { for (String value : personalAttribute.getValue()) { @@ -142,7 +161,8 @@ public class AuthenticationRequest implements IAction { Logger.debug("authn status code value: " + statusCodeValue); try { - Logger.debug("authn saml:" + IOUtils.toString(authnResponse.getTokenSaml())); + Logger.debug("authn saml plain:" + authnResponse.getTokenSaml()); + Logger.debug("authn saml string:" + new String(authnResponse.getTokenSaml())); // radi Logger.debug("authn saml encodedx: " + new String(org.bouncycastle.util.encoders.Base64.encode(IOUtils.toString(authnResponse.getTokenSaml()).getBytes()))); } catch (IOException e) { -- cgit v1.2.3