diff options
| author | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-08-10 08:33:41 +0000 |
|---|---|---|
| committer | Christophe Nowicki <cnowicki@easter-eggs.com> | 2004-08-10 08:33:41 +0000 |
| commit | 18352ddb396946ca7583f8a770cd59ecfca8abdb (patch) | |
| tree | 5406a02ffb53d0894eca7bae6e6e60e032a95b23 | |
| parent | b06cb80fb55fd6976e086fdf8f290f6f539d0534 (diff) | |
| download | lasso-18352ddb396946ca7583f8a770cd59ecfca8abdb.tar.gz lasso-18352ddb396946ca7583f8a770cd59ecfca8abdb.tar.xz lasso-18352ddb396946ca7583f8a770cd59ecfca8abdb.zip | |
Removed the param 'remote_providerID' of lasso_login_init_authn_request() method
Added a param 'remote_providerID' in lasso_login_build_authn_request_msg() method
Fix compilation warnings, avoid multiple definitions and REGISTER_STRING_CONSTANT
| -rw-r--r-- | php/environs/lasso_federation.c | 8 | ||||
| -rw-r--r-- | php/environs/lasso_identity.c | 7 | ||||
| -rw-r--r-- | php/environs/lasso_login.c | 26 | ||||
| -rw-r--r-- | php/environs/lasso_profile.c | 9 | ||||
| -rw-r--r-- | php/environs/lasso_server.c | 9 | ||||
| -rw-r--r-- | php/environs/lasso_session.c | 9 | ||||
| -rw-r--r-- | php/lasso.c | 15 | ||||
| -rw-r--r-- | php/php_lasso.h | 7 | ||||
| -rw-r--r-- | php/xml/lasso_lib_authn_request.c | 9 |
9 files changed, 57 insertions, 42 deletions
diff --git a/php/environs/lasso_federation.c b/php/environs/lasso_federation.c index 6776476a..63d5718b 100644 --- a/php/environs/lasso_federation.c +++ b/php/environs/lasso_federation.c @@ -21,15 +21,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + #include "lasso.h" /* {{{ proto resource lasso_federation_new(string remote_providerID) */ diff --git a/php/environs/lasso_identity.c b/php/environs/lasso_identity.c index 75336a33..4c25c209 100644 --- a/php/environs/lasso_identity.c +++ b/php/environs/lasso_identity.c @@ -21,15 +21,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + #include "lasso.h" /* {{{ proto resource lasso_identity_new() */ diff --git a/php/environs/lasso_login.c b/php/environs/lasso_login.c index 39523215..3cd27382 100644 --- a/php/environs/lasso_login.c +++ b/php/environs/lasso_login.c @@ -21,15 +21,15 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + #include "lasso.h" /* {{{ proto resource lasso_login_new(resource server) */ @@ -60,14 +60,14 @@ PHP_FUNCTION(lasso_login_new) { } /* }}} */ -/* {{{ proto resource lasso_login_init_authn_request(resource login, string metadata) */ +/* {{{ proto resource lasso_login_init_authn_request(resource login) */ PHP_FUNCTION(lasso_login_init_authn_request) { LassoLogin *login; zval *param; char *meta; int meta_len; - zend_printf("DEBUG: lasso_login_new\n"); + zend_printf("DEBUG: lasso_login_init_authn_request\n"); int num_args; int ret; @@ -75,8 +75,7 @@ PHP_FUNCTION(lasso_login_init_authn_request) { if ((num_args = ZEND_NUM_ARGS()) != 2) WRONG_PARAM_COUNT - if (zend_parse_parameters(num_args TSRMLS_CC, "zs", ¶m, - &meta, &meta_len) == FAILURE) { + if (zend_parse_parameters(num_args TSRMLS_CC, "z", ¶m) == FAILURE) { return; } @@ -85,7 +84,7 @@ PHP_FUNCTION(lasso_login_init_authn_request) { zend_printf("DEBUG: login at 0x%p\n", login); - ret = lasso_login_init_authn_request(login, meta); + ret = lasso_login_init_authn_request(login); (ret) ? (RETURN_FALSE) : (RETURN_TRUE); } @@ -181,10 +180,12 @@ PHP_FUNCTION(lasso_login_build_request_msg) { } /* }}} */ -/* {{{ proto lasso_login_build_authn_request_msg(resource login) */ +/* {{{ proto lasso_login_build_authn_request_msg(resource login, string remote_providerID) */ PHP_FUNCTION(lasso_login_build_authn_request_msg) { LassoLogin *login; + char *remote_providerID; + int remote_providerID_len; zend_printf("DEBUG: lasso_login_build_authn_request_msg\n"); @@ -196,7 +197,8 @@ PHP_FUNCTION(lasso_login_build_authn_request_msg) { if ((num_args = ZEND_NUM_ARGS()) != 1) WRONG_PARAM_COUNT - if (zend_parse_parameters(num_args TSRMLS_CC, "z", &parm) == FAILURE) { + if (zend_parse_parameters(num_args TSRMLS_CC, "zs", &parm, + &remote_providerID, &remote_providerID_len) == FAILURE) { return; } @@ -204,6 +206,6 @@ PHP_FUNCTION(lasso_login_build_authn_request_msg) { zend_printf("DEBUG: login at 0x%p\n", login); - lasso_login_build_authn_request_msg(login); + lasso_login_build_authn_request_msg(login, remote_providerID); } /* }}} */ diff --git a/php/environs/lasso_profile.c b/php/environs/lasso_profile.c index 5dd2f37c..3f107e6e 100644 --- a/php/environs/lasso_profile.c +++ b/php/environs/lasso_profile.c @@ -22,15 +22,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + + #include "lasso.h" /* {{{ proto lasso_profile_new(resource server, resource identity, resource session) */ diff --git a/php/environs/lasso_server.c b/php/environs/lasso_server.c index d262715c..4d370c71 100644 --- a/php/environs/lasso_server.c +++ b/php/environs/lasso_server.c @@ -21,15 +21,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + + #include "lasso.h" diff --git a/php/environs/lasso_session.c b/php/environs/lasso_session.c index c42228f3..d5b8e307 100644 --- a/php/environs/lasso_session.c +++ b/php/environs/lasso_session.c @@ -21,13 +21,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + + #include "lasso.h" diff --git a/php/lasso.c b/php/lasso.c index 8ce15d4b..859a36fe 100644 --- a/php/lasso.c +++ b/php/lasso.c @@ -22,15 +22,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + + #include "lasso.h" /* True global resources - no need for thread safety here */ @@ -222,9 +223,9 @@ PHP_MINIT_FUNCTION(lasso) /* Constants */ REGISTER_LONG_CONSTANT("lassoSignatureMethodRsaSha1", 1, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT("lassoLibConsentObtained", lassoLibConsentObtained, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT("lassoLibNameIDPolicyTypeFederated", lassoLibNameIDPolicyTypeFederated, CONST_CS | CONST_PERSISTENT); - REGISTER_STRING_CONSTANT("lassoLibProtocolProfileBrwsArt", lassoLibProtocolProfileBrwsArt, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("lassoLibConsentObtained", (char *) lassoLibConsentObtained, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("lassoLibNameIDPolicyTypeFederated", (char *)lassoLibNameIDPolicyTypeFederated, CONST_CS | CONST_PERSISTENT); + REGISTER_STRING_CONSTANT("lassoLibProtocolProfileBrwsArt", (char *) lassoLibProtocolProfileBrwsArt, CONST_CS | CONST_PERSISTENT); return SUCCESS; diff --git a/php/php_lasso.h b/php/php_lasso.h index 0b6d192d..83a1e8ad 100644 --- a/php/php_lasso.h +++ b/php/php_lasso.h @@ -34,6 +34,13 @@ extern zend_module_entry lasso_module_entry; #include "TSRM.h" #endif +/* Avoid warning about multiple definitions */ +#undef PACKAGE_BUGREPORT +#undef PACKAGE_NAME +#undef PACKAGE_STRING +#undef PACKAGE_TARNAME +#undef PACKAGE_VERSION + /* Resource */ #define le_lassonode_name "LASSO Node Resource" #define le_lassoserver_name "LASSO Server Resource" diff --git a/php/xml/lasso_lib_authn_request.c b/php/xml/lasso_lib_authn_request.c index 69a8a856..58876c66 100644 --- a/php/xml/lasso_lib_authn_request.c +++ b/php/xml/lasso_lib_authn_request.c @@ -22,15 +22,16 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifdef HAVE_CONFIG_H -#include "lasso_config.h" -#endif - #include "php.h" #include "php_ini.h" #include "ext/standard/info.h" #include "../php_lasso.h" +#ifdef HAVE_CONFIG_H +#include "lasso_config.h" +#endif + + #include "lasso.h" /* {{{ proto resource lasso_cast_to_lib_authn_request(resource node) */ |
