start() $options = new ezcAuthenticationSessionOptions(); // setting 60 seconds timeout for session for testing purposes only $options->validity = 60; $session = new ezcAuthenticationSession( $options ); $session->start(); $identity = $session->load(); $url = isset( $_GET['openid_identifier'] ) ? $_GET['openid_identifier'] : $identity; $action = isset( $_GET['action'] ) ? strtolower( $_GET['action'] ) : null; $credentials = new ezcAuthenticationIdCredentials( $url ); $authentication = new ezcAuthentication( $credentials ); $authentication->session = $session; if ( $action === 'logout' ) { $session->destroy(); } if ( !$authentication->run() ) { // authentication did not succeed, so inform the user ?> Please login with your OpenID identifier (an URL, eg. www.example.com or http://www.example.com):
You are logged-in as | Logout