FOSSology  4.4.0
Open Source License Compliance by Open Source Software
common-auth.php File Reference

This file contains common authentication function. More...

Go to the source code of this file.

Functions

 siteminder_check ()
 Check if SiteMinder is enabled. More...
 
 auth_external_check ()
 Check if the external HTTP authentication is enabled. The mapping variables should be configured in fossology.conf Usernames are forced lowercase. More...
 
 account_check (&$user, &$passwd, &$group="")
 check if this account is correct More...
 
 read_permission ($upload, $user)
 Check if the user has the permission to read the copyright/license/etc information of this upload. More...
 
 passwordPolicyEnabled ()
 
 generate_password_policy ()
 
 generate_password_policy_string ()
 

Detailed Description

This file contains common authentication function.

Definition in file common-auth.php.

Function Documentation

◆ account_check()

account_check ( $user,
$passwd,
$group = "" 
)

check if this account is correct

Parameters
string&$userUser name, reference variable
string&$passwdPassword, reference variable
string&$groupGroup, reference variable (optional)
Returns
User id on success, exit(1) on failure.

Definition at line 75 of file common-auth.php.

◆ auth_external_check()

auth_external_check ( )

Check if the external HTTP authentication is enabled. The mapping variables should be configured in fossology.conf Usernames are forced lowercase.

Returns
false if not enabled

Definition at line 38 of file common-auth.php.

◆ generate_password_policy()

generate_password_policy ( )

Generate the password policy regex from sysconfig

Returns
string Regex based on policy selected

Definition at line 241 of file common-auth.php.

◆ generate_password_policy_string()

generate_password_policy_string ( )

Translate selected password policy into user understandable string

Returns
string

Definition at line 284 of file common-auth.php.

◆ passwordPolicyEnabled()

passwordPolicyEnabled ( )

Check if the password policy has been enabled

Returns
boolean

Definition at line 227 of file common-auth.php.

◆ read_permission()

read_permission (   $upload,
  $user 
)

Check if the user has the permission to read the copyright/license/etc information of this upload.

Parameters
int$uploadUpload id
string$userUser name
Returns
1: has the permission; 0: no permission

Definition at line 186 of file common-auth.php.

◆ siteminder_check()

siteminder_check ( )

Check if SiteMinder is enabled.

Note
This can be used for other authentication agents by changing $IDEnvVar
Returns
-1 if not enabled, or the users SEA if enabled

Definition at line 22 of file common-auth.php.