Constants

SAFE_CREDENTIALS_KEY

SAFE_CREDENTIALS_KEY

Properties

$instance

$instance : 

Type

$user

$user : 

Type

$encodedPassword

$encodedPassword : 

Type

$secretKey

$secretKey : 

Type

$separator

$separator : 

Type

$forceSessionCredentials

$forceSessionCredentials : 

Type

Methods

__construct()

__construct() 

Instance constructor

setCredentials()

setCredentials(string  $user, string  $password) : void

Store the user/password pair. Password will be encoded

Parameters

string $user
string $password

getCredentials()

getCredentials() : array|boolean

Return the user/password pair, or false if cannot find it.

Returns

array|boolean

store()

store() : void

Store the password credentials in the session

setEnv()

setEnv() : boolean

Set the encrypted string in the environment for running a CLI.

Returns

boolean

clearEnv()

clearEnv() 

Clear the environment variable

loadPasswordStringFromEnvironment()

loadPasswordStringFromEnvironment(string  $userId) : boolean|mixed

Try to load encrypted string, decode, and get password if the user is corresponding.

Parameters

string $userId

Returns

boolean|mixed

load()

load(string  $encodedString = "") : void

Load the credentials from session

Parameters

string $encodedString

clear()

clear() : void

Remove the credentials from session

forceSessionCredentialsUsage()

forceSessionCredentialsUsage() : void

For the session credentials to override other credentials set via config

storeCredentials()

storeCredentials(string  $user, string  $password) : void

Store the user/pass key pair

Parameters

string $user
string $password

clearCredentials()

clearCredentials() : void

Remove the user/pass encoded from the session

loadCredentials()

loadCredentials() : array|boolean

Retrieve the user/pass from the session

Returns

array|boolean

getEncodedCredentialString()

getEncodedCredentialString() : mixed

Returns

mixed

getCredentialsFromEncodedString()

getCredentialsFromEncodedString(  $encoded) : array|boolean

Parameters

$encoded

Returns

array|boolean

tryLoadingCredentialsFromSources()

tryLoadingCredentialsFromSources(\Pydio\Core\Model\ContextInterface  $ctx) : array

Will try to get the credentials for a given repository as follow : + Try to get the credentials from the url parsing + Try to get them from the user "Wallet" (personal data) + Try to get them from the repository configuration + Try to get them from the MemorySafe.

Parameters

\Pydio\Core\Model\ContextInterface $ctx

Returns

array

_encodePassword()

_encodePassword(  $password,   $user) : string

Use mcrypt function to encode the password

Parameters

$password
$user

Returns

string

_decodePassword()

_decodePassword(  $encoded,   $user) : string

Use mcrypt functions to decode the password

Parameters

$encoded
$user

Returns

string