Skip to content

Commit

Permalink
fix: auth in onboarding service replaced with new package at_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
murali-shris committed Oct 10, 2023
1 parent def786a commit 23f5e20
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 238 deletions.
26 changes: 13 additions & 13 deletions packages/at_onboarding_cli/example/apkam_authenticate.dart
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import 'package:at_client/at_client.dart';
import 'package:at_lookup/at_lookup.dart';
import 'package:at_onboarding_cli/at_onboarding_cli.dart';
import 'package:at_utils/at_logger.dart';

Future<void> main() async {
final enrollIdFromServer = '867307c7-53bd-4736-8fe7-1520de58ce78';
final atSign = '@alice';
// final enrollIdFromServer = '867307c7-53bd-4736-8fe7-1520de58ce78';
AtSignLogger.root_level = 'finest';
final atSign = '@alice🛠';
AtOnboardingPreference atOnboardingPreference = AtOnboardingPreference()
..namespace =
'buzz' // unique identifier that can be used to identify data from your app
..atKeysFilePath = '/home/user/atsign/alice_buzzkey.atKeys'
'wavi' // unique identifier that can be used to identify data from your app
..atKeysFilePath = '/home/murali/.atsign/@alice🛠_key.atKeys'
..rootDomain = 'vip.ve.atsign.zone';
AtOnboardingService? onboardingService = AtOnboardingServiceImpl(
atSign, atOnboardingPreference,
enrollmentId: enrollIdFromServer);
await onboardingService.authenticate(
enrollmentId: enrollIdFromServer); // when authenticating
AtLookUp? atLookup = onboardingService.atLookUp;
AtClient? client = onboardingService.atClient;
print(await client?.getKeys());
print(await atLookup?.scan(regex: 'publickey'));
await onboardingService.close();
atSign, atOnboardingPreference);
await onboardingService.authenticate(); // when authenticating
// AtLookUp? atLookup = onboardingService.atLookUp;
// AtClient? client = onboardingService.atClient;
// print(await client?.getKeys());
// print(await atLookup?.scan(regex: 'publickey'));
// await onboardingService.close();
}
Loading

0 comments on commit 23f5e20

Please sign in to comment.