You are here

function tokenauth_allowed_pages in Token authentication 7

Same name and namespace in other branches
  1. 5 tokenauth.module \tokenauth_allowed_pages()
  2. 6.2 tokenauth.inc \tokenauth_allowed_pages()
  3. 6 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_menu_get_item_alter in ./tokenauth.module
Implements hook_menu_get_item_alter().
tokenauth_url_outbound_alter in ./tokenauth.module
Implements hook_url_outbound_alter().

File

./tokenauth.inc, line 128
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;
  }
}