wp_cassify_custom_parsing_cas_xml_response
This filter allow you to do a custom parsing on CAS Server response.
Usage
Put this code in your functions.php or in another plugin file.
function custom_action_parsing_cas_xml_response( $cas_server_xml_response, $cas_user_datas ) {
// Add custom attribute to user. This attribute can be extracted from external webservice.
$cas_user_datas[ 'custom_param' ] = 'test';
return $cas_user_datas;
}
add_filter( 'wp_cassify_custom_parsing_cas_xml_response', 'custom_action_parsing_cas_xml_response', 1, 2 );
wp_cassify_redirect_service_url_filter
This filter allow you to build service callback url as you want before beeing redirected to CAS.
Usage
Put this code in your functions.php or in another plugin file.
// Process service url before redirect to CAS Server
function custom_action_wp_cassify_redirect_service_url_filter( $service_url ) {
// Build service url with your own value.
$service_url = "http://www.dev.lan/sandbox01/2016/02/09/hello-world/";
return $service_url;
}
add_filter( 'wp_cassify_redirect_service_url_filter', 'custom_action_wp_cassify_redirect_service_url_filter', 1, 1 );
WP_CASSIFY_GRAB_SERVICE_TICKET_ROLES_TO_PUSH
This filter allow to override list roles to push to user connected via CAS.
USAGE
Put this code in your functions.php or in another plugin file.
// Override list roles to push to user connected via CAS.
function custom_action_wp_cassify_grab_service_ticket_roles_to_push( $roles_to_push ) {
array_push( $roles_to_push, 'subscriber' );
return $roles_to_push;
}
add_filter( 'wp_cassify_grab_service_ticket_roles_to_push', 'custom_action_wp_cassify_grab_service_ticket_roles_to_push', 1, 1 );
WP_CASSIFY_CUSTOM_SERVICE_VALIDATE_URL
This filter allow to override service validate url.
USAGE
Put this code in your functions.php or in another plugin file.
// Build you own service validate url. Very useful when you're behind loadbalancer.
function override_service_validate_url( $service_validate_url, $service_ticket, $service_url, $wp_cassify_base_url, $wp_cassify_service_validate_servlet, $wp_cassify_default_service_ticket_parameter_name, $wp_cassify_default_service_service_parameter_name ) {
// Do something you want with $service_validate_url
return $service_validate_url;
}
add_filter( 'wp_cassify_override_service_validate_url', 'override_service_validate_url', 1, 7 );