diff options
author | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-01-23 12:34:14 +0100 |
---|---|---|
committer | Bojan Suzic <bojan.suzic@iaik.tugraz.at> | 2014-01-23 12:34:14 +0100 |
commit | ed9ad9b0c13ee0de3231bab038f35b01beeb0d0b (patch) | |
tree | 680262a5bdf37622e6933fb326361250ea49bb88 /id/server/idserverlib | |
parent | 52dabc099bc80230128a621aa14f1010ba12221e (diff) | |
download | moa-id-spss-ed9ad9b0c13ee0de3231bab038f35b01beeb0d0b.tar.gz moa-id-spss-ed9ad9b0c13ee0de3231bab038f35b01beeb0d0b.tar.bz2 moa-id-spss-ed9ad9b0c13ee0de3231bab038f35b01beeb0d0b.zip |
saml peps engine changeS
Diffstat (limited to 'id/server/idserverlib')
2 files changed, 35 insertions, 1 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnReq.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnReq.java index c79423ffc..9bf4ed0d1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnReq.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKAuthnReq.java @@ -1,8 +1,12 @@ package at.gv.egovernment.moa.id.protocols.stork2; import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.protocols.pvp2x.binding.MOAURICompare; +import at.gv.egovernment.moa.logging.Logger; import eu.stork.peps.auth.commons.STORKAuthnRequest; - +import org.opensaml.common.binding.BasicSAMLMessageContext; +import org.opensaml.saml2.binding.decoding.HTTPPostDecoder; +import org.opensaml.ws.transport.http.HTTPInTransport; /** @@ -24,6 +28,32 @@ public class STORKAuthnReq implements IRequest { return this.storkAuthnRequest; } + public void createStorkReq(HTTPInTransport profileReq) { + Logger.debug("Generate stork request test..."); + storkAuthnRequest = new STORKAuthnRequest(); + + BasicSAMLMessageContext samlMessageContext = new BasicSAMLMessageContext(); + samlMessageContext.setInboundMessageTransport(profileReq); + + HTTPPostDecoder postDecoder = new HTTPPostDecoder(); + postDecoder.setURIComparator(new MOAURICompare()); // TODO Abstract to use general comparator + + try { + Logger.debug("Attempting to decode request..."); + postDecoder.decode(samlMessageContext); + } catch (Exception e) { + Logger.error("Error decoding STORKAuthnRequest", e); + } + + + storkAuthnRequest = (STORKAuthnRequest)samlMessageContext.getInboundSAMLMessage(); + samlMessageContext.getinbound + storkAuthnRequest.set + + } + + + public String getOAURL() { return "https://sp:8889/SP"; // diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java index 15096083e..e99079191 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/stork2/STORKProtocol.java @@ -108,6 +108,10 @@ public class STORKProtocol implements IModulInfo, MOAIDAuthConstants { Logger.debug("STORK2 ISSUER: " + ST2Req.getIssuer().toString()); + STORKAuthnReq storkAuthnReq = new STORKAuthnReq(); + + + return STORK2Request; } |