diff -r 07239de796bb -r e756a8c72c3d cms/drupal/modules/openid/openid.api.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cms/drupal/modules/openid/openid.api.php Fri Sep 08 12:04:06 2017 +0200 @@ -0,0 +1,116 @@ + '_my_discovery_method', + ); +} + +/** + * Allow modules to alter discovery methods. + */ +function hook_openid_discovery_method_info_alter(&$methods) { + // Remove XRI discovery scheme. + unset($methods['xri']); +} + +/** + * Allow modules to declare OpenID normalization methods. + * + * The discovery function callbacks will be called in turn with an unique + * parameter, the identifier to normalize. They have to return a normalized + * identifier, or NULL if the identifier is not in a form they can handle. + * + * The first normalization method that succeed (return a value that is not NULL) + * will stop the normalization process. + * + * @return + * An array with a set of function callbacks, that will be called in turn + * when normalizing an OpenID identifier. The normalization functions have + * to return a normalized identifier, or NULL if the identifier is not in + * a form they can handle. + * @see hook_openid_normalization_method_info_alter() + */ +function hook_openid_normalization_method_info() { + return array( + 'new_normalization_idea' => '_my_normalization_method', + ); +} + +/** + * Allow modules to alter normalization methods. + */ +function hook_openid_normalization_method_info_alter(&$methods) { + // Remove Google IDP normalization. + unset($methods['google_idp']); +} + +/** + * @} End of "addtogroup hooks". + */