/* Variables */
std::string key;
std::string token;
- size_t len;
/* Error checking */
if ( params->isNull() )
std::string("") == params->get("input_token").string())))
{
token = params->get("input_token").string();
- token = (char *)base64_decode(token, &len);
- this->input_token.value = (void *)token.c_str();
- this->input_token.length = token.length();
+ this->input_token.value = base64_decode(token, &this->input_token.length);
}
/* Cleanup */
{
/* Variables */
// MRW -- values should be scoped to the class, so execute can set error values?
- std::string output_str;
+ std::string output_str((char *)output_token.value, output_token.length);
JSONObject *values = new JSONObject();
/* Error checking */
values->set("context_handle", this->contextKey.c_str());
values->set("actual_mech_type", this->getActualMechType().toString().c_str());
// MRW -- is output_token.value guaranteed to be null-terminated?
- output_str = (char *)output_token.value;
+ //output_str = (char *)output_token.value;
values->set("output_token", base64_encode(output_str));
values->set("ret_flags", this->ret_flags);
values->set("time_rec", this->time_rec);