The only problem is that the server is unable to send a response.
So please consider this submission:
Code: Select all
DCUSERID.H:
/** Informs the server whether a positive response was requested.
* @return OFTrue if a response was requested
*/
OFBool isPosResponseRequested()
{
return m_posRspRequested!=0? OFTrue: OFFalse;
}
DCUSERID.CC:
void
UserIdentityNegotiationSubItemAC::setServerResponse(const char* rsp,
const Uint16& rspLen)
{
if (m_serverRsp != NULL)
{
delete[] m_serverRsp;
m_serverRsp = NULL;
}
m_rspLength = rspLen;
if ((rspLen == 0) || (rsp == NULL))
return;
m_serverRsp = new char[rspLen];
memcpy(m_serverRsp, rsp, rspLen);
}
ASSOC.H:
/** Acknowledges a User Identity Negotiation request.
* @param params - [in/out] The association parameters to be filled
* @param response - [in] The response to return (Kerberos or SAML) (will be copied)
* @param length - [in] Length of response
* @return EC_Normal if response could be set, error otherwise
*/
OFCondition ASC_setIdentAC(
T_ASC_Parameters * params,
const char* response,
const Uint16& length );
ASSOC.CC:
OFCondition ASC_setIdentAC(
T_ASC_Parameters * params,
const char* response,
const Uint16& length )
{
if (params == NULL)
return ASC_NULLKEY;
UserIdentityNegotiationSubItemAC* ac = params->DULparams.ackUserIdentNeg;
if (ac == NULL)
ac = new UserIdentityNegotiationSubItemAC();
else
ac->clear();
if( response!=NULL )
ac->setServerResponse(response, length);
params->DULparams.ackUserIdentNeg = ac;
return EC_Normal;
}
Code: Select all
if( userRQ->isPosResponseRequested() )
{
...
ASC_setIdentAC(assoc->params, "ticket goes here", 17 );
Code: Select all
UserIdentityNegotiationSubItemAC *userAC;
ASC_getUserIdentAC(mAssoc->params,&userAC);
if( userAC!=NULL )
{
char* resultBuf;
Uint16 resultLen;
userAC->getServerResponse(resultBuf,resultLen);
...
Pim.