Auth_Module

Provides authorization mechanisms and management
extends Module\Support\Auth implements Opcenter\Contracts\Hookable
Methods Summary
public
public
# session_info( )
Active session information
public
# change_password( string $password , string $user = NULL, string $domain = NULL )
Change an account password user parameter may only be supplied by account admin domain parameter may only be supplied by server admin
public
# password_permitted( string $password , string $user = NULL )
Password meets minimum security requirements
public
# is_demo( )
Account is demo
public
# crypt( string $password , string $salt = NULL )
Encrypt a password using the strongest hash
public
# change_cpassword( string $cpassword , string $user = NULL, string $domain = NULL )
Change password (crypted)
public
# is_inactive( )
Account is inactive
public
# inactive_reason( )
Get inactivity reason
public
# create_api_key( string $comment = '', string $user = NULL )
Generate an API key Generates a 256-bit SOAP key for use with invoking the Web Services in apnscp esprit. The key is a hexadecimal-encoded value traditionally split into groups of 8, or 96 bits per bunch, delimited by a '-'. When authenticating, this is the format preferred, but this function will instead return the 512-bit key gumped into one big string. At this time you are limited to just 10 keys.
public
# set_api_key_comment( string $key , string $comment = NULL, string $user = NULL )
Alter a comment attached to an API key
public
# verify_password( string $password )
Verify account password
public
# get_last_login( )
Queries the last login data for the current user. Response will be empty on first login, otherwise an associative array of indexes date and IP are returned containing the date as an integer (unix timestamp) and IP address in in conventional IPv4 fashion
public
# get_login_history( int $limit = NULL )
Retrieves all login requests for a user Return is NULL if this is the first time logging in, otherwise an associative array of indexes date and IP are returned containing the date as an integer (unix timestamp) and IP address in in conventional IPv4 fashion
public
# change_domain( string $domain )
Change primary account domain
public
# change_username( string $user )
Change primary account username
public
# set_temp_password( string $item , int $duration = 120, string $password = NULL )
Set a temporary password for an account
public
public
protected
public
# user_permitted( string $user , string $svc = 'cp' )
User permitted to service

see

self::user_enabled()
public
# user_enabled( string $user , string $svc = 'cp' )
User permitted to service
public
# deny_user( string $user , string $svc = 'cp' )
Deny user access
public
# permit_user( string $user , $svc = 'cp' )
Permit user access to apnscp
public
# restrict_ip( string $ip , string $gate = NULL )
Restrict login to IP
public
# remove_ip_restriction( string $ip , string $gate = NULL )
Remove IP restriction
public
# get_ip_restrictions( )
Get authorized IPs
public
# _edit_user( string $userold , string $usernew , array $oldpwd )
public
# _reset( Util_Account_Editor & $editor = NULL )
public
public
# get_api_keys( string $user = NULL )
array get_api_keys (void) listing all keys associated to an account: - key: the generated key - last_used: an integer representation of the last date the key was used. If the key was never used, null is set for that value. Returns the list of SOAP keys associated to an account
public
# delete_api_key( string $key , string $user = NULL )
Delete SOAP key The key should be in hexadecimal strictly without dashes, case does not matter.
public
public
public
public
# _verify_conf( Opcenter\Service\ConfigurationContext $ctx )
Methods inherited from Module\Support\Auth
getAuthService(), sendNotice(), rebuildMap()
Methods inherited from Module\Skeleton\Standard
__construct(), setUserParameters(), autoloadModule(), __wakeup(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), cleanUserParameters(), query()
Constants Summary
public array DEPENDENCY_MAP
# array ( 0 => 'siteinfo', 1 => 'users', )
public int API_KEY_LIMIT
# 10
public string API_USER_SYNC_COMMENT
# 'ApisCP user sync'
public string PWOVERRIDE_KEY
# 'pwoverride'
public string SECURITY_TOKEN
# 'sectoken'
public int MIN_PW_LENGTH
# 7
public string ADMIN_AUTH
# '/etc/opcenter/webhost/passwd'
public array PAM_SERVICES
# array ( 0 => 'cp', 1 => 'dav', )
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties Summary
protected $exportedFunctions

# array ( '*' => 15, 'inactive_reason' => 3, 'verify_password' => 31, 'change_domain' => 2, 'change_username' => 10, 'set_temp_password' => 10, )
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id