fix: get client info
This commit is contained in:
parent
44584fb882
commit
35d9f280fb
5 changed files with 8 additions and 3 deletions
|
@ -31,6 +31,7 @@ return [
|
|||
(new Extend\Routes('api'))
|
||||
->get('/oauth-clients', 'oauth.clients.list', Api\Controller\ListClientController::class)
|
||||
->post('/oauth-clients', 'oauth.clients.create', Api\Controller\CreateClientController::class)
|
||||
->get('/oauth-clients/{client_id}', 'oauth.clients.show', Api\Controller\ShowClientController::class)
|
||||
->patch('/oauth-clients/{id}', 'oauth.clients.update', Api\Controller\UpdateClientController::class)
|
||||
->delete('/oauth-clients/{id}', 'oauth.clients.delete', Api\Controller\DeleteClientController::class),
|
||||
|
||||
|
|
BIN
js/dist/forum.js
generated
vendored
BIN
js/dist/forum.js
generated
vendored
Binary file not shown.
BIN
js/dist/forum.js.map
generated
vendored
BIN
js/dist/forum.js.map
generated
vendored
Binary file not shown.
|
@ -20,8 +20,9 @@ export default class AuthorizePage extends IndexPage {
|
|||
m.route.set('/');
|
||||
} else {
|
||||
this.params = params;
|
||||
app.store.find('oauth-clients', {'client_id': params.client_id}).then(client => {
|
||||
app.store.find('oauth-clients', params.client_id).then(client => {
|
||||
this.client = client;
|
||||
console.log(client);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,10 +16,13 @@ class ShowClientController extends AbstractListController
|
|||
protected function data(ServerRequestInterface $request, Document $document)
|
||||
{
|
||||
$client_id = Arr::get($request->getQueryParams(), 'client_id');
|
||||
RequestUtil::getActor($request)->assertUser();
|
||||
RequestUtil::getActor($request)->assertRegistered();
|
||||
|
||||
$client = Client::whereOrFail('client_id', $client_id);
|
||||
$client->client_secret = '<PROTECT>';
|
||||
|
||||
if (isset($client->client_secret)) {
|
||||
$client->client_secret = '<PROTECT>';
|
||||
}
|
||||
|
||||
return $client;
|
||||
|
||||
|
|
Loading…
Reference in a new issue