AtOnboardingServiceImpl class
class containing service that can onboard/activate/authenticate @signs
- Implemented types
Constructors
- AtOnboardingServiceImpl(dynamic atsign, AtOnboardingPreference atOnboardingPreference, {AtServiceFactory? atServiceFactory, String? enrollmentId})
Properties
- atAuth ↔ AtAuth?
-
getter/setter pairoverride
- atChops ↔ AtChops?
-
getter/setter pairoverride
- atClient ↔ AtClient?
-
getter/setter pairoverride
- atLookUp ↔ AtLookUp?
-
getter/setter pairoverride
- atOnboardingPreference ↔ AtOnboardingPreference
-
getter/setter pair
- atServiceFactory ↔ AtServiceFactory?
-
The object which controls what types of AtClients, NotificationServices
and SyncServices get created when we call
AtClientManager.setCurrentAtSign
. If atServiceFactory is not set, AtClientManager.setCurrentAtSign will use aDefaultAtServiceFactory
getter/setter pair - hashCode → int
-
The hash code for this object.
no setterinherited
- logger ↔ AtSignLogger
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
authenticate(
{String? enrollmentId}) → Future< bool> -
Authenticate into secondary server using PKAM privateKey for legacy clients
For clients that are enrolled through APKAM, pass the enrollmentId and auth is done using APKAM private key
returns true if authenticated
override
-
close(
) → Future< void> -
Closes the current instance of onboarding_service
override
-
enroll(
String appName, String deviceName, String otp, Map< String, String> namespaces, {int? pkamRetryIntervalMins}) → Future<AtEnrollmentResponse> -
Sends an enroll request to the server. Apps that are already enrolled will receive notifications for this enroll request and can approve/deny the request
appName - application name of the client e.g wavi,buzz, atmosphere etc.,
deviceName - device identifier from the requesting application e.g iphone,any unique ID that identifies the requesting client
otp - otp retrieved from an already enrolled app
namespaces - key-value pair of namespace-access of the requesting client e.g {"wavi":"rw","contacts":"r"}
pkamRetryIntervalMins - optional param which specifies interval in mins for pkam retry for this enrollment.
The passed value will override the value in AtOnboardingPreference
override
-
generateAESKey(
) → String - generate random AES key
-
generateRsaKeypair(
) → RSAKeypair - generates random RSA keypair
-
getAtClient(
) → Future< AtClient?> -
returns an authenticated instance of AtClient
override
-
getAtLookup(
) → AtLookUp? -
returns authenticated instance of AtLookup
override
-
getServerStatus(
) → Future< AtStatus> - returns secondary server status
-
isOnboarded(
) → Future< bool> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onboard(
) → Future< bool> -
perform initial one_time authentication to activate the atsign
returns true if onboarded
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getSecretFromQr(
String? path) → String? - extracts cram secret from qrCode