mod_auth_openid is an authentication module for the Apache 2 webserver. It handles the functions of an OpenID consumer as specified in the OpenID 2.0 specification.
After a user authenticates themselves, the user’s identity will be available in the REMOTE_USER variable. A cookie named open_id_session_id is saved to maintain each user’s session.
1. Install the module
apt-get install libapache2-mod-auth-openid
2. Enable the module
3. You can now add the line below to any Directory, Location or File directive in the virtual host configuration or a .htaccess file .
4. Restart Apache