Remove ClientCsrQuery
Summary: Already have SecureClientQuery. No need to have this as a type as it's not used or needed anywhere. Reviewed By: antonk52 Differential Revision: D47210345 fbshipit-source-id: d9f3026a0e2a0b5dd2e87f16dba34a388dacd75f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4a0ad8c1c3
commit
e052c27f27
@@ -92,13 +92,11 @@ export type ClientQuery = {
|
|||||||
rsocket?: boolean;
|
rsocket?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type ClientCsrQuery = {
|
export type SecureClientQuery = ClientQuery & {
|
||||||
csr?: string | undefined;
|
csr?: string | undefined;
|
||||||
csr_path?: string | undefined;
|
csr_path?: string | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type SecureClientQuery = ClientQuery & ClientCsrQuery;
|
|
||||||
|
|
||||||
export type ClientDescription = {
|
export type ClientDescription = {
|
||||||
readonly id: string;
|
readonly id: string;
|
||||||
readonly query: ClientQuery;
|
readonly query: ClientQuery;
|
||||||
|
|||||||
@@ -57,11 +57,6 @@ type ClientInfo = {
|
|||||||
client: ClientDescription;
|
client: ClientDescription;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ClientCsrQuery = {
|
|
||||||
csr?: string | undefined;
|
|
||||||
csr_path?: string | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responsible of creating and managing the actual underlying servers:
|
* Responsible of creating and managing the actual underlying servers:
|
||||||
* - Insecure (used for certificate exchange)
|
* - Insecure (used for certificate exchange)
|
||||||
@@ -202,8 +197,9 @@ export class ServerController
|
|||||||
sdk_version,
|
sdk_version,
|
||||||
medium,
|
medium,
|
||||||
rsocket,
|
rsocket,
|
||||||
|
csr,
|
||||||
|
csr_path,
|
||||||
},
|
},
|
||||||
{csr, csr_path},
|
|
||||||
downgrade,
|
downgrade,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -423,15 +419,14 @@ export class ServerController
|
|||||||
*/
|
*/
|
||||||
async addConnection(
|
async addConnection(
|
||||||
connection: ClientConnection,
|
connection: ClientConnection,
|
||||||
query: ClientQuery,
|
query: SecureClientQuery,
|
||||||
csrQuery: ClientCsrQuery,
|
|
||||||
silentReplace?: boolean,
|
silentReplace?: boolean,
|
||||||
): Promise<ClientDescription> {
|
): Promise<ClientDescription> {
|
||||||
invariant(query, 'expected query');
|
invariant(query, 'expected query');
|
||||||
|
|
||||||
// try to get id by comparing giving `csr` to file from `csr_path`
|
// try to get id by comparing giving `csr` to file from `csr_path`
|
||||||
// otherwise, use given device_id
|
// otherwise, use given device_id
|
||||||
const {csr_path, csr} = csrQuery;
|
const {csr_path, csr} = query;
|
||||||
|
|
||||||
// For Android, device id might change
|
// For Android, device id might change
|
||||||
if (csr_path && csr && query.os === 'Android') {
|
if (csr_path && csr && query.os === 'Android') {
|
||||||
|
|||||||
Reference in New Issue
Block a user