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
This commit is contained in:
Nick Burch
2011-12-07 06:17:02 +00:00
parent 8259b3c9da
commit a0e9898ca2

View File

@@ -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<String,Object> model = new TreeMap<String, Object>();
model.put("authStatus", authStatus.name());