WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Authenticator

This plugin allows you to make your WordPress site accessible to logged in users only.

Requirements

  • WordPress version 1.5 and later, see tested up to
  • PHP 5.2*
  • Single or Multisite installation

On PHP-CGI setups: * mod_setenvif or mod_rewrite (if you want to user HTTP-Authentication for feeds)

Installation

  1. Unpack the download-package
  2. Upload folder include the file to the /wp-content/plugins/ directory.
  3. Activate the plugin through the Plugins menu in WordPress

or use the installer via backend of WordPress

On PHP-CGI setups

If you want to use HTTP-Authentication for feeds (available since 1.1.0 as a optional feature) you have to update your .htaccess file. If mod_setenvif is available, add the following line to your .htaccess:

SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1

Otherwise you need mod_rewrite to be enabled. In this case you have to add the following line to your .htaccess:

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

In a typical WordPress .htaccess it all looks like:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteRule . /index.php [L]
</IfModule>

respectively in a multisite installation:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule . index.php [L]
# END WordPress

Settings

You can change the settings of Authenticator on Options → Reading. The settings refer to the behaviour of your blog's feeds. Should they be protected by HTTP-Authentication (not all Feed-Readers support this) or by an authentication token, which is simply add to your feed URL as Parameter. The third option is to keep everything in place. So Feed-URLs will be redirected to the login page if the user is not logged in (send no auth-cookie).

If you using token authentication, you can show the token to the blog users on their profile settings page by setting these option.

HTTP Auth

Users can gain access to the feed with their Username/Password.

Token Auth

The plugin will generate a token automaticaly, when choosing this option. Copy this token and share it with the people who should have access to your feed. If your token is ef05aa961a0c10dce006284213727730 the feed-URLs looks like so:

# main feed
http://yourblog.com/feed/?ef05aa961a0c10dce006284213727730

#main comment feed
http://yourblog.com/comments/feed/?ef05aa961a0c10dce006284213727730

#without permalinks
http://yourblog.com/?feed=rss2&ef05aa961a0c10dce006284213727730

API

Filters

  • authenticator_get_options Whith this filter you have access to the current authentication-token:

    <?php $authenticator_options = apply_filters( 'authenticator_get_options', array() );

  • authenticator_bypass_feed_auth gives you the posibillity to open the feeds for everyone. No authentication will be required then.

    <?php add_filter( 'authenticator_bypass_feed_auth', '__return_true'

Requires: 1.5 or higher
Compatible up to: 4.0-alpha
Last Updated: 2014-6-26
Downloads: 35,728

Ratings

5 stars
5 out of 5 stars

Support

1 of 1 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1
100,2,2
100,2,2
100,1,1 100,1,1 100,1,1
100,1,1
100,1,1
100,4,4
100,2,2
100,2,2
100,2,2
100,1,1 100,1,1
100,1,1
0,1,0