atsign-foundation / at_client_sdk

The Dart implementation of atSDK used for implementing Atsign's technology into other software

Home Page:https://pub.dev/publishers/atsign.org/packages

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remove passing privateKey to RemoteSecondary constructor

murali-shris opened this issue · comments

Describe the bug

Private key shouldn't be read from preferences anywhere in the atClient code

Steps to reproduce

n/a

Expected behavior

#1141
atsign-foundation/at_libraries#434
Once the above tasks are done, we can remove code which read private key from preference

  • AtClientImpl --> _init(..) remove privateKey from being passed to RemoteSecondary constructor
    _remoteSecondary ??= RemoteSecondary(_atSign, _preference!,
    atChops: atChops,
    privateKey: _preference!.privateKey,
    enrollmentId: _enrollmentId);
  • RemoteSecondary constructor
    Remove the line
    privateKey ??= preference.privateKey;
    and remove passing of privateKey to AtLookupImpl constructor
    atLookUp = AtLookupImpl(atSign, preference.rootDomain, preference.rootPort,
    privateKey: privateKey,
    cramSecret: preference.cramSecret,
    secondaryAddressFinder:
    AtClientManager.getInstance().secondaryAddressFinder,
    secureSocketConfig: secureSocketConfig,
    clientConfig: _getClientConfig());

Screenshots

No response

Smartphones

No response

Were you using an atApplication when the bug was found?

No response

Additional context

No response