You are here

function tokenauth_allowed_pages in Token authentication 6.2

Same name and namespace in other branches
  1. 5 tokenauth.module \tokenauth_allowed_pages()
  2. 6 tokenauth.inc \tokenauth_allowed_pages()
  3. 7 tokenauth.inc \tokenauth_allowed_pages()

Helper function to determine if the current path is tokenauth-enabled.

Parameters

$path: The Drupal path to be checked for access.

Return value

Return TRUE if current page may be viewed using only a token

2 calls to tokenauth_allowed_pages()
tokenauth_init in ./tokenauth.module
Implementation of hook_init().
tokenauth_url_outbound_alter in ./tokenauth.module
Implementation of hook_url_outbound_alter(). Appends the current user's token to any path run through url() that also passes tokenauth's allowed pages filter.

File

./tokenauth.inc, line 134
Provides tokenauth API for Token Authentication module.

Code

function tokenauth_allowed_pages($path) {
  $patterns = variable_get('tokenauth_pages', "rss.xml\n*/feed\n*/opml");
  if (drupal_match_path($path, $patterns)) {
    return TRUE;
  }
}