PHP code example of kiwfy / credential-manager-php

1. Go to this page and download the library: Download kiwfy/credential-manager-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

kiwfy / credential-manager-php example snippets


use CredentialManager\Credential;
$redisConfig = [
    'host' => 'localhost',
    'port' => 6379,
];
$credential = new Credential($redisConfig);
$credential->setCredential(
    'originName',
    'serviceName',
    'CredentialSample'
);
$getCredential = $credential->getCredential('originName', 'serviceName');
var_dump($getCredential);
sh
php sample/credential-sample.php