revert headers

This commit is contained in:
koalasat
2025-04-08 16:54:27 +02:00
parent e5f2a91537
commit 00891a2ddd
5 changed files with 0 additions and 8 deletions

View File

@ -35,11 +35,9 @@ class Robot {
const tokenSHA256 = this.tokenSHA256 ?? ''; const tokenSHA256 = this.tokenSHA256 ?? '';
const encPrivKey = this.encPrivKey ?? ''; const encPrivKey = this.encPrivKey ?? '';
const pubKey = this.pubKey ?? ''; const pubKey = this.pubKey ?? '';
const nostrPubKey = this.nostrPubKey ?? '';
return { return {
tokenSHA256, tokenSHA256,
nostrPubKey,
keys: { keys: {
pubKey: pubKey.split('\n').join('\\'), pubKey: pubKey.split('\n').join('\\'),
encPrivKey: encPrivKey.split('\n').join('\\'), encPrivKey: encPrivKey.split('\n').join('\\'),

View File

@ -7,7 +7,6 @@ import { getPublicKey } from 'nostr-tools';
export interface AuthHeaders { export interface AuthHeaders {
tokenSHA256: string; tokenSHA256: string;
nostrPubKey: string;
keys: { keys: {
pubKey: string; pubKey: string;
encPrivKey: string; encPrivKey: string;

View File

@ -17,7 +17,6 @@ class ApiNativeClient implements ApiClient {
...headers, ...headers,
...{ ...{
Authorization: `Token ${auth.tokenSHA256}`, Authorization: `Token ${auth.tokenSHA256}`,
Nostr: auth.nostrPubKey,
}, },
}; };
} else if (auth?.keys != null) { } else if (auth?.keys != null) {
@ -25,7 +24,6 @@ class ApiNativeClient implements ApiClient {
...headers, ...headers,
...{ ...{
Authorization: `Token ${auth.tokenSHA256} | Public ${auth.keys.pubKey} | Private ${auth.keys.encPrivKey}`, Authorization: `Token ${auth.tokenSHA256} | Public ${auth.keys.pubKey} | Private ${auth.keys.encPrivKey}`,
Nostr: auth.nostrPubKey,
}, },
}; };
} }

View File

@ -13,7 +13,6 @@ class ApiWebClient implements ApiClient {
...headers, ...headers,
...{ ...{
Authorization: `Token ${auth.tokenSHA256}`, Authorization: `Token ${auth.tokenSHA256}`,
Nostr: auth.nostrPubKey,
}, },
}; };
} else if (auth?.keys != null) { } else if (auth?.keys != null) {
@ -21,7 +20,6 @@ class ApiWebClient implements ApiClient {
...headers, ...headers,
...{ ...{
Authorization: `Token ${auth.tokenSHA256} | Public ${auth.keys.pubKey} | Private ${auth.keys.encPrivKey}`, Authorization: `Token ${auth.tokenSHA256} | Public ${auth.keys.pubKey} | Private ${auth.keys.encPrivKey}`,
Nostr: auth.nostrPubKey,
}, },
}; };
} }

View File

@ -3,7 +3,6 @@ import ApiNativeClient from './ApiNativeClient';
export interface Auth { export interface Auth {
tokenSHA256: string; tokenSHA256: string;
nostrPubKey: string;
keys?: { pubKey: string; encPrivKey: string }; keys?: { pubKey: string; encPrivKey: string };
} }