diff options
author | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-06-19 08:55:49 +0200 |
---|---|---|
committer | Christof Rabensteiner <christof.rabensteiner@iaik.tugraz.at> | 2019-06-19 08:55:49 +0200 |
commit | 1bad320e50f66e44fcb23f0c8d242809f8077520 (patch) | |
tree | 2c65c6f9ca55c95c2327bdd39474cfab35f73d46 /eaaf_modules/eaaf_module_pvp2_idp | |
parent | 5d306c41c0033f330413cf2b18db9f1137d51980 (diff) | |
parent | 470ac2c6234a0bac1e973fd3c1f49e1d9da41be4 (diff) | |
download | EAAF-Components-1bad320e50f66e44fcb23f0c8d242809f8077520.tar.gz EAAF-Components-1bad320e50f66e44fcb23f0c8d242809f8077520.tar.bz2 EAAF-Components-1bad320e50f66e44fcb23f0c8d242809f8077520.zip |
Merge branch 'master' into moa-sig-dependency-fixup
Diffstat (limited to 'eaaf_modules/eaaf_module_pvp2_idp')
-rw-r--r-- | eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java index 4ec7cf99..cbbed659 100644 --- a/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java +++ b/eaaf_modules/eaaf_module_pvp2_idp/src/main/java/at/gv/egiz/eaaf/modules/pvp2/idp/impl/AuthenticationAction.java @@ -90,31 +90,32 @@ public class AuthenticationAction implements IAction { } + @Override public SLOInformationInterface processRequest(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp, IAuthData authData) throws ResponderErrorException { - PVPSProfilePendingRequest pvpRequest = (PVPSProfilePendingRequest) req; + final PVPSProfilePendingRequest pvpRequest = (PVPSProfilePendingRequest) req; try { //get basic information - PVPSProfileRequest moaRequest = (PVPSProfileRequest) pvpRequest.getRequest(); - AuthnRequest authnRequest = (AuthnRequest) moaRequest.getSamlRequest(); - EntityDescriptor peerEntity = moaRequest.getEntityMetadata(metadataProvider); + final PVPSProfileRequest moaRequest = (PVPSProfileRequest) pvpRequest.getRequest(); + final AuthnRequest authnRequest = (AuthnRequest) moaRequest.getSamlRequest(); + final EntityDescriptor peerEntity = moaRequest.getEntityMetadata(metadataProvider); - AssertionConsumerService consumerService = + final AssertionConsumerService consumerService = SAML2Utils.createSAMLObject(AssertionConsumerService.class); consumerService.setBinding(pvpRequest.getBinding()); consumerService.setLocation(pvpRequest.getConsumerURL()); - DateTime date = new DateTime(); - SLOInformationImpl sloInformation = new SLOInformationImpl(); - String issuerEntityID = pvpBasicConfiguration.getIDPEntityId(pvpRequest.getAuthURL()); + final DateTime date = new DateTime(); + final SLOInformationImpl sloInformation = new SLOInformationImpl(); + final String issuerEntityID = pvpBasicConfiguration.getIDPEntityId(pvpRequest.getAuthURL()); //build Assertion - Assertion assertion = assertionBuilder.buildAssertion(issuerEntityID, pvpRequest, authnRequest, authData, + final Assertion assertion = assertionBuilder.buildAssertion(issuerEntityID, pvpRequest, authnRequest, authData, peerEntity, date, consumerService, sloInformation); - Response authResponse = AuthResponseBuilder.buildResponse( + final Response authResponse = AuthResponseBuilder.buildResponse( metadataProvider, issuerEntityID, authnRequest, - date, assertion, authConfig.getBasicMOAIDConfigurationBoolean( + date, assertion, authConfig.getBasicConfigurationBoolean( CONFIG_PROPERTY_PVP2_ENABLE_ENCRYPTION, true)); IEncoder binding = null; @@ -148,11 +149,11 @@ public class AuthenticationAction implements IAction { log.warn("Message Encoding exception", e); throw new ResponderErrorException("pvp2.01", null, e); - } catch (EAAFException e) { + } catch (final EAAFException e) { log.info("Response generation error: Msg: ", e.getMessage()); throw new ResponderErrorException(e.getErrorId(), e.getParams(), e); - } catch (Exception e) { + } catch (final Exception e) { log.warn("Response generation error", e); throw new ResponderErrorException("pvp2.01", null, e); @@ -160,11 +161,13 @@ public class AuthenticationAction implements IAction { } + @Override public boolean needAuthentication(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp) { return true; } + @Override public String getDefaultActionName() { return "PVPAuthenticationRequestAction"; |