#ifndef WAF_SP_H
#define WAF_SP_H
//#include <auth_transport.h>
#define REDIRECT_TO_IDP 1 

/* WafSp Login argument, extended from basic arg */
typedef struct _WafSpAgentLoginArg {
    /* Basic argument */
   // WebAuthArg_t      mWebAuthArg;

    /* Agent handle */
    void             *mAgentHandle;

    /* Requested URI */
    char             *mpProtUri;
    unsigned int      mProtUriLen;

    /* Requested method */
    char             *mpProtMethod;
    unsigned int      mProtMethodLen;

    /* User id */
    char             *mpUserName;

    /* Password */
    char             *mpPasswd;

    /* Client IP */
    char              mClientIp[16];

    /*hostname */
    char		hostname[64];

    /*content Type*/
	char * 	contentType;

    /* SMSESSION SSO token */
    char             *mpSsoToken;
    unsigned int      mSsoTokenLen;

    /* server time difference */
    int               mSvrTimeDiff;

    /* Protected URI realm ptr */
    void             *mWafSpRealmPtr;

    /* User session ptr */
    void             *mSessionPtr;

    /* User Shib Target Waf Object  ptr */
    void             *stw;


    /* Whether decode can expect create to fill in some RPC response 
     * values - an ugly kludge 
     * TRUE if called from CreateSSO */
    int       createCalled;
    int 	isSecurePort;
} WafSpAgentLoginArg_t;
typedef WafSpAgentLoginArg_t WafSpAgentCreateSsoArg_t;
/* Siteminder DecodeSSO token argument, same as login argument */
typedef WafSpAgentLoginArg_t WafSpAgentDecodeSsoArg_t;

/* Siteminder Authorize argument, same as login argument */
typedef WafSpAgentLoginArg_t WafSpAgentAuthorizeArg_t;

#ifdef __cplusplus
extern "C" 
#endif
int shib_check_user(WafSpAgentLoginArg_t *reqPtr, char *targetURL);

#ifdef __cplusplus
extern "C" 
#endif
int shib_child_init();

#endif