From bd8401b7cec32546edb6f93d0468d60dbe9dfcd0 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 27 Aug 2015 13:18:10 +0200 Subject: fix merge problem with OpenID connect --- .../moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java | 5 ++++- .../moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'id/server/idserverlib/src/main/java') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java index 3bef7844c..06509b333 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java @@ -171,14 +171,17 @@ public class OAuth20AuthRequest extends OAuth20BaseRequest { try { // OAOAUTH20 cannot be null at this point. check was done in base request OAAuthParameter oAuthConfig = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(this.getOAURL()); - + + if (!this.getClientID().equals(oAuthConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_OPENID_CLIENTID)) || !this.getRedirectUri().equals(oAuthConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_OPENID_REDIRECTURL))) { throw new OAuth20AccessDeniedException(); } + this.setOnlineApplicationConfiguration(oAuthConfig); Logger.info("Dispatch OpenIDConnect AuthRequest: ClientID=" + this.clientID); + } catch (ConfigurationException e) { throw new OAuth20WrongParameterException(OAuth20Constants.PARAM_CLIENT_ID); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java index 9d611b2f1..6bebe5a6a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java @@ -133,6 +133,8 @@ class OAuth20TokenRequest extends OAuth20BaseRequest { throw new OAuth20AccessDeniedException(); } + this.setOnlineApplicationConfiguration(oaParam); + } catch (ConfigurationException e) { throw new OAuth20WrongParameterException(OAuth20Constants.PARAM_CLIENT_ID); -- cgit v1.2.3