/* * Copyright (c) 2012 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include namespace Swift { EXTERNALClientAuthenticator::EXTERNALClientAuthenticator() : ClientAuthenticator("EXTERNAL"), finished(false) { } boost::optional EXTERNALClientAuthenticator::getResponse() const { const std::string& authorizationID = getAuthorizationID(); if (authorizationID.empty()) { return boost::optional(); } else { return createSafeByteArray(authorizationID); } } bool EXTERNALClientAuthenticator::setChallenge(const boost::optional&) { if (finished) { return false; } finished = true; return true; } }