PHP Classes

File: sample/credential-sample.php

Recommend this page to a friend!
  Classes of Leonardo Di Sarli   PHP Redis Credential Manager   sample/credential-sample.php   Download  
File: sample/credential-sample.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Redis Credential Manager
Manage credentials stored in a Redis server
Author: By
Last change:
Date: 8 months ago
Size: 412 bytes
 

Contents

Class file image Download
<?php

require_once __DIR__ . '/../vendor/autoload.php';

use
CredentialManager\Credential;

$redisConfig = [
   
'host' => 'localhost',
   
'port' => 6379,
];

$credential = new Credential($redisConfig);

$credential->setCredential(
   
'originName',
   
'serviceName',
   
'CredentialSample'
);

$getCredential = $credential->getCredential('originName', 'serviceName');

print_r($getCredential);
echo
PHP_EOL;