Auth_Module

+------------------------------------------------------------+ | apnscp | +------------------------------------------------------------+ | Copyright (c) Apis Networks | +------------------------------------------------------------+ | Licensed under Artistic License 2.0 | +------------------------------------------------------------+ | Author: Matt Saladna (msaladna@apisnetworks.com) | +------------------------------------------------------------+
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( $password , $user = NULL )
public
# crypt( string $password , string|null $salt = NULL )
Encrypt a password using the strongest hash
public
# change_cpassword( $cpassword , $user = NULL, $domain = NULL )
public
# is_demo( )
public
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 false 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
# user_enabled( $user , $svc = 'cp' )
public
# user_permitted( $user , $svc = 'cp' )
public
# change_domain( string $domain )
Change primary account domain
public
# change_username( string $user )
Change primary account username
public
# set_temp_password( string $site , int $limit = 120, string|null $password = NULL )
Set a temporary password for an account
public
# get_api_keys( $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 , $user = NULL )
Delete SOAP key The key should be in hexadecimal strictly without dashes, case does not matter.
public
public
public
# deny_user( $user , $svc = 'cp' )
public
# permit_user( string $user , $svc = 'cp' )
Permit user access to apnscp
public
# _edit_user( string $userold , string $usernew , array $oldpwd )
public
# _reset( Util_Account_Editor & $editor = NULL )
protected
public
public
public
public
public
# _verify_conf( Opcenter\Service\ConfigurationContext $ctx )
Methods inherited from Module_Support_Auth
sendNotice(), rebuildMap(), getAuthService()
Methods inherited from Module\Skeleton\Standard
__construct(), __wakeup(), autoloadModule(), setUserParameters(), cleanUserParameters(), setSessionId(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), getServices(), getNewServices(), getActiveServices(), getConfig(), getServiceValue(), setConfigJournal(), setConfig(), query(), _resetModule()
Constants Summary
public array DEPENDENCY_MAP
# array ( 0 => 'siteinfo', 1 => 'users', )
public int API_KEY_LIMIT
# 10
public string API_USER_SYNC_COMMENT
# 'apnscp user sync'
public string PWOVERRIDE_KEY
# 'pwoverride'
public string LOGIN_KEY
# 'sectoken'
public int MIN_PW_LENGTH
# 7
public string ADMIN_AUTH
# '/etc/opcenter/webhost/passwd'
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id, $pgsql, $mysql