Skip to content

Commit

Permalink
Fix public key retrieving (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
iwex authored and jhaoda committed May 17, 2017
1 parent da87c66 commit 96e235e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Add to `config/services.php`:
'odnoklassniki' => [
'client_id' => env('ODNOKLASSNIKI_ID'),
'client_secret' => env('ODNOKLASSNIKI_SECRET'),
'client_public' => env('ODNOKLASSNIKI_PUBLIC'),
'redirect' => env('ODNOKLASSNIKI_REDIRECT'),
],
```
Expand Down
9 changes: 8 additions & 1 deletion src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected function getUserByToken($token)
$params = [
'format' => 'json',
'method' => 'users.getCurrentUser',
'application_key' => env('ODNOKLASSNIKI_PUBLIC'),
'application_key' => $this->getConfig('client_public'),
'fields' => 'uid,name,first_name,last_name,birthday,pic190x190,has_email,email'
];

Expand Down Expand Up @@ -87,4 +87,11 @@ protected function getTokenFields($code)
'grant_type' => 'authorization_code',
]);
}

public static function additionalConfigKeys()
{
return [
'client_public'
];
}
}

0 comments on commit 96e235e

Please sign in to comment.