From a0e9898ca20a51d1dc437dc009e5641ff123b8ea Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Wed, 7 Dec 2011 06:17:02 +0000 Subject: [PATCH] Try to fix the compile error fallout from r32575 - Auth URLs are now a pair git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32590 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web/scripts/publishing/AuthCallbackWebScript.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/repo/web/scripts/publishing/AuthCallbackWebScript.java b/source/java/org/alfresco/repo/web/scripts/publishing/AuthCallbackWebScript.java index 76c03dba98..1111793a49 100644 --- a/source/java/org/alfresco/repo/web/scripts/publishing/AuthCallbackWebScript.java +++ b/source/java/org/alfresco/repo/web/scripts/publishing/AuthCallbackWebScript.java @@ -27,6 +27,7 @@ import javax.servlet.http.HttpServletResponse; import org.alfresco.service.cmr.publishing.channels.Channel; import org.alfresco.service.cmr.publishing.channels.ChannelService; import org.alfresco.service.cmr.publishing.channels.ChannelType; +import org.alfresco.service.cmr.publishing.channels.ChannelType.AuthUrlPair; import org.alfresco.service.cmr.repository.NodeRef; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -90,13 +91,14 @@ public class AuthCallbackWebScript extends DeclarativeWebScript if (ChannelType.AuthStatus.RETRY.equals(authStatus)) { - String authoriseUrl = channel.getChannelType().getAuthorisationUrls(channel, channelAuthHelper.getAuthoriseCallbackUrl(channelNodeRef)); - if (authoriseUrl == null) + AuthUrlPair authoriseUrls = channel.getChannelType().getAuthorisationUrls(channel, channelAuthHelper.getAuthoriseCallbackUrl(channelNodeRef)); + String authRequestUrl = authoriseUrls.authorisationRequestUrl; + if (authRequestUrl == null) { - authoriseUrl = channelAuthHelper.getDefaultAuthoriseUrl(channelNodeRef); + authRequestUrl = channelAuthHelper.getDefaultAuthoriseUrl(channelNodeRef); } status.setCode(HttpServletResponse.SC_MOVED_TEMPORARILY); - status.setLocation(authoriseUrl); + status.setLocation(authRequestUrl); } Map model = new TreeMap(); model.put("authStatus", authStatus.name());