ona  18.1.1
About: OpenNetAdmin provides a database managed inventory of your IP network (with Web and CLI interface).
  Fossies Dox: ona-18.1.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

functions_auth.inc.php File Reference

Go to the source code of this file.

Functions

 load_auth_class ($authtype='')
 
 get_authentication ($login_name='', $login_password='')
 
 get_perms ($login_name='')
 
 auth_cryptPassword ($clear, $method='', $salt=null)
 
 auth_verifyPassword ($clear, $crypt)
 

Variables

 $auth = ''
 

Function Documentation

◆ auth_cryptPassword()

auth_cryptPassword (   $clear,
  $method = '',
  $salt = null 
)

Encrypts a password using the given method and salt

If the selected method needs a salt and none was given, a random one is chosen.

The following methods are understood:

smd5 - Salted MD5 hashing apr1 - Apache salted MD5 hashing md5 - Simple MD5 hashing sha1 - SHA1 hashing ssha - Salted SHA1 hashing crypt - Unix crypt mysql - MySQL password (old method) my411 - MySQL 4.1.1 password kmd5 - Salted MD5 hashing as used by UNB

Author
Andreas Gohr andi@.nosp@m.spli.nosp@m.tbrai.nosp@m.n.or.nosp@m.g
Returns
string The crypted password

Definition at line 205 of file functions_auth.inc.php.

References $conf, $text, and printmsg().

Referenced by auth_verifyPassword().

◆ auth_verifyPassword()

auth_verifyPassword (   $clear,
  $crypt 
)

Verifies a cleartext password against a crypted hash

The method and salt used for the crypted hash is determined automatically then the clear text password is crypted using the same method. If both hashs match true is is returned else false

Author
Andreas Gohr andi@.nosp@m.spli.nosp@m.tbrai.nosp@m.n.or.nosp@m.g
Returns
bool

Definition at line 299 of file functions_auth.inc.php.

References auth_cryptPassword().

◆ get_authentication()

get_authentication (   $login_name = '',
  $login_password = '' 
)

Authenticates the username/password supplied against the system configured auth type.

Author
Matt Pascoe matt@.nosp@m.open.nosp@m.netad.nosp@m.min..nosp@m.com
Returns
int 1 or 0 indicating success or failure of auth
string A Javascript code containint status messages

Definition at line 65 of file functions_auth.inc.php.

References $auth, $base, $conf, $onadb, $self, load_auth_class(), and printmsg().

Referenced by ws_logingo().

◆ get_perms()

get_perms (   $login_name = '')

Authorizes a user for specific permissions

Populates session variable with permissions. no data is returned to the calling function

Author
Matt Pascoe matt@.nosp@m.open.nosp@m.netad.nosp@m.min..nosp@m.com
Returns
TRUE

Definition at line 132 of file functions_auth.inc.php.

References $_SESSION, $auth, $conf, $groups, $onadb, $permissions, $record, $self, $status, db_get_record(), db_get_records(), and printmsg().

Referenced by ws_logingo().

◆ load_auth_class()

load_auth_class (   $authtype = '')

Loads the specified Authentication class

Authentication classes are located in www/include/auth/

if no Authentication type is passed, it will use the system configured 'authtype'

Author
Matt Pascoe matt@.nosp@m.open.nosp@m.netad.nosp@m.min..nosp@m.com
Returns
struct Auth class structure

Definition at line 17 of file functions_auth.inc.php.

References $_SESSION, $auth, $base, $conf, and printmsg().

Referenced by get_authentication().

Variable Documentation

◆ $auth

$auth = ''

Definition at line 3 of file functions_auth.inc.php.

Referenced by get_authentication(), get_perms(), and load_auth_class().