1 # <a name="Package <code>TWiki::_LoginManager::"></a><a name="Package =TWiki::_LoginManager::_"></a> Package =TWiki::LoginManager::ApacheLogin
3 This is login manager that you can specify in the security setup section of [configure](http://www.dementia.org/twiki/configure). It instructs TWiki to cooperate with your web server (typically Apache) to require authentication information (username & password) from users. It requires that you configure your web server to demand authentication for scripts named "login" and anything ending in "auth". The latter should be symlinks to existing scripts; e.g., `viewauth -> view`, `editauth -> edit`, and so on.
5 See also [[TWikiUserAuthentication]].
7 Subclass of TWiki::LoginManager; see that class for documentation of the methods of this class.
11 <li><a href="#Package =TWiki::_LoginManager::"> Package TWiki::LoginManager::ApacheLogin</a><ul>
12 <li><a href="#ClassMethod <strong>new</strong> ($session)"> ClassMethod new <tt>($session)</tt></a></li>
13 <li><a href="#ObjectMethod *forceAuthenticatio"> ObjectMethod forceAuthentication <tt>() -> boolean</tt></a></li>
14 <li><a href="#ObjectMethod <strong>loginUrl</strong> () -> $l"> ObjectMethod loginUrl <tt>() -> $loginUrl</tt></a></li>
15 <li><a href="#ObjectMethod <strong>login</strong> ($query,$tw"> ObjectMethod login <tt>($query,$twiki)</tt></a></li>
16 <li><a href="#ObjectMethod <strong>getUser</strong> () -> $au"> ObjectMethod getUser <tt>() -> $authUser</tt></a></li>
22 ## <a name="ClassMethod <strong>new</strong> ($session)"></a> [[ClassMethod]] **new** `($session)`
24 Construct the [[ApacheLogin]] object
26 ## <a name="ObjectMethod <strong>forceAuthenticatio"></a> [[ObjectMethod]] \*forceAuthentication `() -> boolean`
28 method called when authentication is required - redirects to (...|view)auth Triggered on auth fail
30 ## <a name="ObjectMethod <strong>loginUrl</strong> () - $lo"></a> [[ObjectMethod]] **loginUrl** `() -> $loginUrl`
32 TODO: why is this not used internally? When is it called, and why Content of a login link
34 ## <a name="ObjectMethod <strong>login</strong> ($query,$tw"></a> [[ObjectMethod]] **login** `($query,$twiki)`
36 this allows the login and logon cgi-scripts to use the same code. all a logon does, is re-direct to viewauth, and apache then figures out if it needs to challenge the user
38 ## <a name="ObjectMethod <strong>getUser</strong> () - $aut"></a> [[ObjectMethod]] **getUser** `() -> $authUser`
40 returns the userLogin if stored in the apache CGI query (ie session)