mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-02-09 19:39:17 +00:00
feat: user application dashboard (#727)
Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type {
|
||||
AuthorizedOidcClient,
|
||||
AuthorizeResponse,
|
||||
OidcClient,
|
||||
OidcClientCreate,
|
||||
@@ -113,6 +114,24 @@ class OidcService extends APIService {
|
||||
});
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async listAuthorizedClients(options?: SearchPaginationSortRequest) {
|
||||
const res = await this.api.get('/oidc/users/me/clients', {
|
||||
params: options
|
||||
});
|
||||
return res.data as Paginated<AuthorizedOidcClient>;
|
||||
}
|
||||
|
||||
async listAuthorizedClientsForUser(userId: string, options?: SearchPaginationSortRequest) {
|
||||
const res = await this.api.get(`/oidc/users/${userId}/clients`, {
|
||||
params: options
|
||||
});
|
||||
return res.data as Paginated<AuthorizedOidcClient>;
|
||||
}
|
||||
|
||||
async revokeOwnAuthorizedClient(clientId: string) {
|
||||
await this.api.delete(`/oidc/users/me/clients/${clientId}`);
|
||||
}
|
||||
}
|
||||
|
||||
export default OidcService;
|
||||
|
||||
Reference in New Issue
Block a user