Account: use a public authorization token for accounts
Instead of using a single configured app, use a public auth token (essentially, any random app configured), to split it from being contextual and provide theoretically more ability to query.
This commit is contained in:
Родитель
8f538f417f
Коммит
2e079f107b
|
@ -12,7 +12,7 @@ import { corporateLinkToJson } from './corporateLink';
|
|||
import { Organization } from './organization';
|
||||
import { AppPurpose } from '../lib/github/appPurposes';
|
||||
import { ILinkProvider } from '../lib/linkProviders';
|
||||
import { CacheDefault, getMaxAgeSeconds } from '.';
|
||||
import { CacheDefault, Operations, getMaxAgeSeconds } from '.';
|
||||
import {
|
||||
AccountJsonFormat,
|
||||
CoreCapability,
|
||||
|
@ -358,8 +358,10 @@ export class Account {
|
|||
cacheOptions.backgroundRefresh = options.backgroundRefresh;
|
||||
}
|
||||
try {
|
||||
const ops = operations as Operations;
|
||||
const entity = (await operations.github.request(
|
||||
this.authorize(AppPurpose.Data),
|
||||
ops.getPublicAuthorizationToken(),
|
||||
// this.authorize(AppPurpose.Data),
|
||||
'GET /user/:id',
|
||||
parameters,
|
||||
cacheOptions
|
||||
|
|
Загрузка…
Ссылка в новой задаче