Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

at_onboarding_cli #134

Merged
merged 42 commits into from
Mar 22, 2022
Merged

at_onboarding_cli #134

merged 42 commits into from
Mar 22, 2022

Conversation

srieteja
Copy link
Contributor

@srieteja srieteja commented Feb 9, 2022

closes atsign-foundation/at_server#474

- What I did
Enabling support to onboard and authenticate atSign's from command-line.

- How I did it
Created a new library that has all the required functionality to onboard and authenticate atSigns.

- How to verify it
This is a work in progress, no unit tests have been written. But temporarily bin/example.dart can verify the functionality.

- Description for the changelog

@srieteja srieteja marked this pull request as draft February 9, 2022 13:24
@srieteja srieteja changed the title AtOnboarding CLI at_onboarding_cli Feb 10, 2022
@cpswan
Copy link
Member

cpswan commented Feb 18, 2022

@srieteja I've put instructions for reading from and writing to the SIM card at https://github.com/atsign-company/mwc_demo/tree/trunk/gsm

As you won't be using minicom to access it you'll have to use libserialport to connect to /dev/ttyS0

@srieteja srieteja marked this pull request as ready for review March 2, 2022 08:39
@srieteja srieteja requested a review from cconstab March 2, 2022 08:39
Copy link
Member

@cconstab cconstab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

I have run through a few test and everything works that I have tried..

The only thing we need to decide is the name of the package..

at_onboarding_cli or just at_onboarding or at_onboarding_dart

My only comment was in the naming of

lib/at_cli_onboarding.dart

the cli before onboarding confused me

@srieteja
Copy link
Contributor Author

Great work!

I have run through a few test and everything works that I have tried..

The only thing we need to decide is the name of the package..

at_onboarding_cli or just at_onboarding or at_onboarding_dart

My only comment was in the naming of

lib/at_cli_onboarding.dart

the cli before onboarding confused me

@cconstab I have changed the name to at_onboarding_cli for now. We can have further discussion to decide the name if required.

@murali-shris murali-shris merged commit 28d621a into trunk Mar 22, 2022
@@ -0,0 +1,10 @@
import 'dart:core';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import is not necessary. Cause I see String is the only data type that comes from dart sdk. We don't need it. Please LMK if something goes wrong if we remove it.

} else {
_atClient ??= await getAtClient();
_isPkamAuthenticated =
(await _atLookup?.authenticate(atOnboardingPreference.privateKey))!;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you strictly wating for true/false value, you can actualy use _atLookup! instead of _atLookup?. Incase if you think _atLookup will be null, then write a if condition for it. The thing what happens is, If _atLookup is null, then _isPkamAuthenticated will be null. The above mentioned is a possible solution or there is an alternative solution, here it is :

_isPkamAuthenticated = await _atLookup?.authenticate(atOnboardingPreference.privateKey) ?? false;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

at_onboarding_cli -- An onboarding library for cli/dart code
5 participants