mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-28 16:00:24 +05:30
Merge pull request #847 from Sephster/master
Minor Coding Standard Fixes
This commit is contained in:
commit
4c548dbd78
@ -49,16 +49,18 @@ $app->get(
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$totalUsers = count($users);
|
||||||
|
|
||||||
// If the access token doesn't have the `basic` scope hide users' names
|
// If the access token doesn't have the `basic` scope hide users' names
|
||||||
if (in_array('basic', $request->getAttribute('oauth_scopes')) === false) {
|
if (in_array('basic', $request->getAttribute('oauth_scopes')) === false) {
|
||||||
for ($i = 0; $i < count($users); $i++) {
|
for ($i = 0; $i < $totalUsers; $i++) {
|
||||||
unset($users[$i]['name']);
|
unset($users[$i]['name']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the access token doesn't have the `email` scope hide users' email addresses
|
// If the access token doesn't have the `email` scope hide users' email addresses
|
||||||
if (in_array('email', $request->getAttribute('oauth_scopes')) === false) {
|
if (in_array('email', $request->getAttribute('oauth_scopes')) === false) {
|
||||||
for ($i = 0; $i < count($users); $i++) {
|
for ($i = 0; $i < $totalUsers; $i++) {
|
||||||
unset($users[$i]['email']);
|
unset($users[$i]['email']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,6 @@ $app = new App([
|
|||||||
$privateKeyPath,
|
$privateKeyPath,
|
||||||
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
|
'lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen'
|
||||||
);
|
);
|
||||||
$server->setEncryptionKey('lxZFUEsBCJ2Yb14IF2ygAHI5N4+ZAUXXaSeeJm6+twsUmIen');
|
|
||||||
|
|
||||||
// Enable the implicit grant on the server with a token TTL of 1 hour
|
// Enable the implicit grant on the server with a token TTL of 1 hour
|
||||||
$server->enableGrantType(new ImplicitGrant(new \DateInterval('PT1H')));
|
$server->enableGrantType(new ImplicitGrant(new \DateInterval('PT1H')));
|
||||||
|
Loading…
Reference in New Issue
Block a user