File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ USERBASE_CLIENT_URL :
2+ description : userbase client connection. Either use a full DSN or a plain URL for the UserBase Authentication API endpoint
3+ type : url
4+ example : https://username@password@userbase.example.com
5+ required : true
Original file line number Diff line number Diff line change @@ -34,6 +34,12 @@ The `examples/` directory contains a few example scripts that you can use during
3434
3535First, copy the ` .env.dist ` file to ` .env ` . Edit the contents to match your Userbase server and credentials.
3636
37+ ``` bash
38+ cp .env.dist .env e
39+ edit .env # Edit configuration, database settings etc
40+ ./vendor/bin/envoi validate # Run command validate based on meta file .env.yaml
41+ ```
42+
3743Then you can simply execute the examples like this:
3844
3945 php examples/checkcredentials.php alice sshhh
Original file line number Diff line number Diff line change 99 "name" : " Joost Faassen" ,
1010 "email" : " j.faassen@linkorb.com" ,
1111 "role" : " Development"
12+ },
13+ {
14+ "name" : " kaushik prajapati" ,
15+ "email" : " prajapatikaushik@gmail.com" ,
16+ "role" : " Developer"
1217 }
1318 ],
1419 "require" : {
1520 "php" : " >=5.3.0" ,
1621 "linkorb/userbase-role-contracts" : " ^1.0" ,
1722 "symfony/security" : " ~2.6 || ~3.0 || ^4" ,
1823 "psr/cache" : " ~1.0" ,
19- "symfony/cache" : " ~3.0 || ^4"
24+ "symfony/cache" : " ~3.0 || ^4" ,
25+ "linkorb/envoi" : " ^1.1"
2026 },
2127 "require-dev" : {
2228 "symfony/dotenv" : " ~3.0 || ^4"
Original file line number Diff line number Diff line change 22
33require_once __DIR__ .'/../vendor/autoload.php ' ;
44
5- use UserBase \ Client \ Client ;
5+ use Envoi \ Envoi ;
66use Symfony \Component \Dotenv \Dotenv ;
7+ use UserBase \Client \Client ;
8+
79
8- $ dotenv = new Dotenv ();
9- $ dotenv ->load (__DIR__ .'/../.env ' );
10+ // .env validate
11+ $ envFilename = __DIR__ .'/../.env ' ;
12+ $ envMetaFile = __DIR__ .'/../.env.yaml ' ;
13+ Envoi::init ($ envFilename , $ envMetaFile );
1014
1115$ url = getenv ('USERBASE_CLIENT_URL ' );
12- $ username = getenv ('USERBASE_CLIENT_USERNAME ' );
13- $ password = getenv ('USERBASE_CLIENT_PASSWORD ' );
16+ // $username = getenv('USERBASE_CLIENT_USERNAME');
17+ // $password = getenv('USERBASE_CLIENT_PASSWORD');
1418
1519if (!$ url ) {
1620 echo "Environment variables not yet properly configured \n" ;
1721 exit ();
1822}
1923
20- $ client = new Client ($ url, $ username , $ password );
24+ $ client = new Client ($ url );
You can’t perform that action at this time.
0 commit comments