diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-11-10 18:44:03 +0100 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-11-10 18:44:03 +0100 |
commit | 5b78f619548a47bed61b813e1610b6954a74e969 (patch) | |
tree | 43fd38cf6a71eb80f4dc77f551d4cf4f292aaa6e /id/server | |
parent | b8042dd90af4c8d7e5b73b58acff4fd8d4196dde (diff) | |
download | moa-id-spss-5b78f619548a47bed61b813e1610b6954a74e969.tar.gz moa-id-spss-5b78f619548a47bed61b813e1610b6954a74e969.tar.bz2 moa-id-spss-5b78f619548a47bed61b813e1610b6954a74e969.zip |
original mandate hiding ident
Diffstat (limited to 'id/server')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java index 929313dd1..74af70bda 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/MandateRetrievalRequest.java @@ -41,6 +41,9 @@ import eu.stork.peps.auth.commons.PersonalAttribute; import eu.stork.peps.auth.commons.PersonalAttributeList; import eu.stork.peps.auth.commons.STORKAttrQueryResponse; import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.*; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.codec.binary.StringUtils; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.xml.bind.JAXBContext; @@ -74,8 +77,12 @@ public class MandateRetrievalRequest implements IAction { this.representingIdentityLink = authData.getIdentityLink(); this.QAALevel = translateQAALevel(authData.getQAALevel()); + // preparing original content and removing sensitive data from it this.originalContent = authData.getMISMandate().getMandate(); - + //Logger.debug("Original content " + StringUtils.newStringUtf8(authData.getMISMandate().getMandate())); + String originalMandate = StringUtils.newStringUtf8(authData.getMISMandate().getMandate()).replaceAll("<pd:Value>.*?==</pd:Value><pd:Type>urn:publicid:gv.at:baseid</pd:Type>","<pd:Value></pd:Value><pd:Type></pd:Type>");; + Logger.debug("Removing personal identification value and type from original mandate "); + originalContent = StringUtils.getBytesUtf8(originalMandate); OAAuthParameter oaParam = AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(req.getOAURL()); if (oaParam == null) |