-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #461 from atsign-foundation/apkam_atonboarding_lat…
…est_atauth feat: enrollment code changes for reusability between at_client_mobile and at_onboarding_cli
- Loading branch information
Showing
14 changed files
with
439 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/at_auth/lib/src/enroll/at_enrollment_notification_request.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import 'package:at_auth/src/enroll/at_enrollment_request.dart'; | ||
|
||
/// In APKAM approval flow, use this class from a privileged client to set attributes required for enrollment approval. | ||
/// Once a notification is received on the privileged client which can approve enrollment notifications from new devices, | ||
/// use [AtEnrollmentNotificationRequestBuilder] to create [AtEnrollmentNotificationRequest] | ||
class AtEnrollmentNotificationRequest extends AtEnrollmentRequest { | ||
String _encryptedApkamSymmetricKey; | ||
|
||
String get encryptedApkamSymmetricKey => _encryptedApkamSymmetricKey; | ||
|
||
AtEnrollmentNotificationRequest.builder( | ||
AtEnrollmentNotificationRequestBuilder | ||
atEnrollmentNotificationRequestBuilder) | ||
: _encryptedApkamSymmetricKey = | ||
atEnrollmentNotificationRequestBuilder._encryptedApkamSymmetricKey, | ||
super.builder(atEnrollmentNotificationRequestBuilder); | ||
} | ||
|
||
class AtEnrollmentNotificationRequestBuilder | ||
extends AtEnrollmentRequestBuilder { | ||
late String _encryptedApkamSymmetricKey; | ||
|
||
AtEnrollmentNotificationRequestBuilder setEncryptedApkamSymmetricKey( | ||
String encryptedApkamSymmetricKey) { | ||
_encryptedApkamSymmetricKey = encryptedApkamSymmetricKey; | ||
return this; | ||
} | ||
|
||
/// Builds and returns an instance of [AtEnrollmentNotificationRequest]. | ||
AtEnrollmentNotificationRequest build() { | ||
return AtEnrollmentNotificationRequest.builder(this); | ||
} | ||
} |
Oops, something went wrong.