<?xml version="1.0" encoding="iso-8859-1"?>
<module name="Ft.Server.Common.ClAuthenticate" file="/work/a/ports/textproc/py-4suite/work/4Suite-1.0b1/build/lib.freebsd-8.0-RELEASE-p2-i386-2.4/Ft/Server/Common/ClAuthenticate.py">
  <modification-date>2004-09-03 17:11:20</modification-date>
  <abstract>Repository client (4ss, 4ss_manager) common login routines</abstract>
  <description>Copyright 2004 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/</description>
  <classes>
    <class name="Error" public="yes">
      <bases>
      </bases>
      <abstract/>
      <description/>
      <method-resolution-order>
        <base name="Error" module="Ft.Server.Common.MessageSource"/>
      </method-resolution-order>
      <fields documented="yes" class="Error" module="Ft.Server.Common.MessageSource" inherited="no">
        <field public="no" name="INTERNAL_ERROR" id="Error-INTERNAL_ERROR">
          <value>1</value>
        </field>
        <field public="no" name="PASSWDFILE_UNDEFINED" id="Error-PASSWDFILE_UNDEFINED">
          <value>10</value>
        </field>
      </fields>
    </class>
    <class name="FtServerAuthenticationException" public="yes">
      <bases>
        <base documented="yes" class="FtServerBaseException" module="Ft.Server"/>
      </bases>
      <abstract/>
      <description/>
      <method-resolution-order>
        <base name="FtServerAuthenticationException" module="Ft.Server.Common.ClAuthenticate"/>
        <base name="FtServerBaseException" module="Ft.Server"/>
        <base name="FtException" module="Ft"/>
        <base name="Exception" module="exceptions"/>
      </method-resolution-order>
      <fields documented="yes" class="FtServerAuthenticationException" module="Ft.Server.Common.ClAuthenticate" inherited="no">
        <field public="no" name="MessageSource" id="FtServerAuthenticationException-MessageSource">
          <value>&lt;module 'Ft.Server.Common.MessageSource' from 'b...E-p2-i386-2.4/Ft/Server/Common/MessageSource.py'&gt;</value>
        </field>
      </fields>
      <methods documented="yes" class="FtServerBaseException" module="Ft.Server" inherited="yes">
        <member-reference name="__init__" public="no"/>
      </methods>
      <methods documented="yes" class="FtException" module="Ft" inherited="yes">
        <member-reference name="__getattr__" public="no"/>
        <member-reference name="__repr__" public="no"/>
        <member-reference name="__str__" public="no"/>
      </methods>
      <methods documented="no" class="Exception" module="exceptions" inherited="yes">
        <member-reference name="__getitem__" public="no"/>
      </methods>
    </class>
    <class name="PasswordFileManager" public="yes">
      <bases>
      </bases>
      <abstract/>
      <description/>
      <method-resolution-order>
        <base name="PasswordFileManager" module="Ft.Server.Common.ClAuthenticate"/>
      </method-resolution-order>
      <methods documented="yes" class="PasswordFileManager" module="Ft.Server.Common.ClAuthenticate" inherited="no">
        <method public="no" name="__init__" id="PasswordFileManager-__init__">
          <abstract/>
          <description/>
          <arguments>
            <arg name="self"/>
          </arguments>
        </method>
        <method public="no" name="getUserEntry" id="PasswordFileManager-getUserEntry">
          <abstract>Gets the password hash, hostname, and port for the given username
in the password file. Returns (None, None, 0) if there is no entry
for the username, or if the password file is not readable.</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="userName"/>
          </arguments>
        </method>
        <method public="no" name="setUserEntry" id="PasswordFileManager-setUserEntry">
          <abstract>Stores the password hash, hostname, and port for the given username
in the password file, overwriting any existing entry for the user.
Raises an exception if any of the values are inappropriate for
storage or if there was a problem storing them in the file.</abstract>
          <description/>
          <arguments>
            <arg name="self"/>
            <arg name="userName"/>
            <arg name="passwdHash"/>
            <arg name="hostName"/>
            <arg name="port"/>
          </arguments>
        </method>
      </methods>
    </class>
  </classes>
  <functions>
    <function public="yes" name="GetHostName" id="GetHostName">
      <abstract>Prompts for a hostname on stderr.</abstract>
      <description/>
      <arguments>
        <arg default="'Host: '" name="prompt"/>
      </arguments>
    </function>
    <function public="yes" name="GetPass" id="GetPass">
      <abstract>Wrapper for getpass.getpass(), with the only difference being that
on Unix, the prompt will be sent to stderr rather than stdout.</abstract>
      <description/>
      <arguments>
        <arg default="'Password: '" name="prompt"/>
      </arguments>
    </function>
    <function public="yes" name="GetPort" id="GetPort">
      <abstract>Prompts for a port on stderr.</abstract>
      <description/>
      <arguments>
        <arg default="'Port: '" name="prompt"/>
      </arguments>
    </function>
    <function public="yes" name="GetUserName" id="GetUserName">
      <abstract>Prompts for a username on stderr.
Keeps prompting if emptyOK is false and no username is entered.</abstract>
      <description/>
      <arguments>
        <arg default="'Username: '" name="prompt"/>
        <arg default="True" name="emptyOK"/>
      </arguments>
    </function>
    <function public="yes" name="HashPasswd" id="HashPasswd">
      <abstract>Returns a hash of the given password string.</abstract>
      <description/>
      <arguments>
        <arg name="passwd"/>
      </arguments>
    </function>
    <function public="yes" name="UserAuthenticate" id="UserAuthenticate">
      <abstract>Obtains a username and password hash, prompting for them, if necessary.
Returns a tuple (username, password), which can be (None, None).</abstract>
      <description>Username sources normally checked are, in order:
1. the options dictionary;
2. the agent referenced in the FTSS_AGENT environment variable;
3. the FTSS_USERNAME environment variable;
4. a prompt for user input.

Password sources normally checked are, in order:
1. the password file referenced in environment var. FTSS_PASSWORD_FILE;
2. the password file $HOME/.4ss.passwd or %WINDIR%\.4ss.passwd;
3. the password file referenced in the deprecated environment variable
   FTSERVER_PASSWORD_FILE;
4. a prompt for user input.

Optional arguments:

options - a dictionary of options parsed from the command line
(see FancyGetOpt). The key 'anonymous' is taken to indicate that no
authentication is necessary and (None, None) should be returned.
If the key 'username' is present, the associated value is returned as
the username and no other potential sources for username are checked.

prompt - if the user is to be prompted for their username, this is the
string that indicates the type of user to be mentioned in the prompt.
It is 'User' or 'Manager', typically.

promptOnly - if set, this flag forces the username and password to be
obtained by prompting the user; other sources are not checked.</description>
      <arguments>
        <arg default="None" name="options"/>
        <arg default="'User'" name="prompt"/>
        <arg default="0" name="promptOnly"/>
      </arguments>
    </function>
    <function public="no" name="_raw_input" id="_raw_input">
      <abstract/>
      <description/>
      <arguments>
        <arg default="''" name="prompt"/>
      </arguments>
    </function>
  </functions>
  <fields>
    <field public="no" name="__all__" id="__all__">
      <value>['FtServerAuthenticationException', 'Error', 'GetUserName', 'GetPass', 'GetHostName', 'GetPort', 'HashPasswd', 'PasswordFileManager', 'UserAuthenticate']</value>
    </field>
    <field public="no" name="default_passwdFilename" id="default_passwdFilename">
      <value>'.4ss.passwd'</value>
    </field>
  </fields>
</module>
