Skip to content

Commit

Permalink
updated example
Browse files Browse the repository at this point in the history
  • Loading branch information
deweller committed Oct 25, 2016
1 parent 6b5e552 commit a59ccdf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/check-username-tca.php
Expand Up @@ -11,7 +11,7 @@
export TOKENPASS_CLIENT_ID=xxxxx
export TOKENPASS_CLIENT_SECRET=xxxxx
./check-username-tca.php <username> <rules>
./check-username-tca.php <oauth_token> <username> <rules>
*/

Expand All @@ -20,12 +20,13 @@
$api = new TokenpassAPI();

// get vars
$username = $argv[1];
$rules = json_decode($argv[2], true);
$oauth_token = $argv[1];
$username = $argv[2];
$rules = json_decode($argv[3], true);

// check
echo "Checking user $username with rules: ".json_encode($rules)."\n";
$result = $api->checkTokenAccess($username, $rules);
$result = $api->checkTokenAccess($username, $rules, $oauth_token);

// handle error
if ($result === false) {
Expand Down

0 comments on commit a59ccdf

Please sign in to comment.