Some comments
This commit is contained in:
parent
970c0e68e7
commit
dadeb066c8
2 changed files with 8 additions and 0 deletions
|
@ -174,6 +174,8 @@ export class BackendApiService {
|
||||||
}
|
}
|
||||||
|
|
||||||
jwtPost(endpoint: string, path: string, publicKey: string, body: any): Observable<any> {
|
jwtPost(endpoint: string, path: string, publicKey: string, body: any): Observable<any> {
|
||||||
|
// TODO - we may not need this method
|
||||||
|
// see notes in: (identity) src/app/identity.service.ts
|
||||||
const request = this.identityService.jwt({
|
const request = this.identityService.jwt({
|
||||||
...this.identityService.identityServiceParamsForKey(publicKey),
|
...this.identityService.identityServiceParamsForKey(publicKey),
|
||||||
});
|
});
|
||||||
|
|
|
@ -96,6 +96,12 @@ export class IdentityService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private handleJwt(data: any): void {
|
private handleJwt(data: any): void {
|
||||||
|
// Give a permission token that expires in 10 minutes. DeSo apps use it for
|
||||||
|
// things like image uploading. Creation of this token is subject to same
|
||||||
|
// access level requirements as actions and transactions.
|
||||||
|
// TODO - make this work with LBRY. Or, nix it if we know we don't need it.
|
||||||
|
// Perhaps this will actually *be* our "actions"?
|
||||||
|
|
||||||
if (!this.approve(data, AccessLevel.ApproveAll)) {
|
if (!this.approve(data, AccessLevel.ApproveAll)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue