mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-19 01:03:20 +00:00
revert headers
This commit is contained in:
@ -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('\\'),
|
||||||
|
@ -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;
|
||||||
|
@ -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,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -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,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -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 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user