- Ensure you’ve check all plugin requirements.
- Download and install the plugin via Admin Panel > Plugins menu.
- Activate plugin on your blog via Admin Panel > Plugins.
Basic configuration
Customize logout page
Populate CAS User Attribute from session
Be careful, to access to CAS User Attribute from session :
- Before 1.8.4
$_SESSION['wp_cassify_cas_user_datas']
- From 1.8.4
$_SESSION['wp_cassify'][ $this->wp_cassify_current_blog_id ]['wp_cassify_cas_user_datas']
BYPASS CAS AUTHENTICATION
Use this method recommended by Susan Boland. This template allow you to have Two authentications methods on the same page. On the first hand, the classic wordpress authentication forms and on the other hand, link to redirect to CAS Server for CAS authentication. (You can replace link to CAS with button for design).
<?php
/**
* Template Name:Twice
*
* @link http://codex.wordpress.org/Template_Hierarchy
*
* @package WordPress
* @subpackage Twenty_Sixteen
* @since Twenty Sixteen 1.0
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<!-- 1) Classic WordPress login form -->
<div>
Local WordPress Authentication
<?php
$args = array(
'echo' => true,
'remember' => true,
'redirect' => site_url( '/?wp_cassify_bypass=bypass' ),
'form_id' => 'loginform',
'id_username' => 'user_login',
'id_password' => 'user_pass',
'id_remember' => 'rememberme',
'id_submit' => 'wp-submit',
'label_username' => __( 'Username' ),
'label_password' => __( 'Password' ),
'label_remember' => __( 'Remember Me' ),
'label_log_in' => __( 'Log In' ),
'value_username' => '',
'value_remember' => false
);
wp_login_form( $args );
?>
</div>
<!-- 2) Link to CAS Authentication form -->
<div><a href="<?php echo do_shortcode( '[wp_cassify_login_with_redirect service_redirect_url="' . wp_login_url() . '"]' ); ?>">CAS Authentication</a></div>
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Don’t use bypass using method below. It’s deprecated.
Download the template file called “Twice” (Sorry, it’s pdf, not text file due to my wordpress free hosting plan).