at_auth library

The AtAuth package contains common logic for onboarding/authenticating an atSign to a secondary server

Classes

AtAuth
Interface for onboarding and authentication to a secondary server of an atsign
AtAuthRequest
AtAuthResponse
AtAuthSession
The explicit auth→client hand-off artifact.
AtEnrollment
An abstract class for submitting and managing the enrollment requests.
AtEnrollmentRecord
Base class for enrollment-related data objects.
AtEnrollmentRequest
The EnrollmentRequest is used by the apps to submit enrollment request for APKAM keys which provides .atKeys specific to an application with restricted access to the namespaces. The application can access only the namespaces which are specified in the enrollment request. If the namespace has Read-Write access then the application is allowed to create/update the data, otherwise, if the namespace has only Read access then the application is allowed to read the data, but cannot create/update the data.
AtEnrollmentResponse
Represents the response of an enrollment operation received from the secondary server.
AtKeys
The in-memory model of an atsign's cryptographic keys.
AtKeysAssurance
Single home for all atKeys validation: low-level parsing/value checks (expect*/optional*, called by the models' fromJson) and cross-material structural invariants (validateKeyMaterials, validateAddKey, validateMapUpdate).
AtKeysIo
Base type for reading AtKeys. Implemented by classes that read AtKeys from different sources.
AtKeysMaterial
One cryptographic key material — e.g. the public half of an encryption keypair. This is the object app code interacts with everywhere in AtKeys's API (addKey, getKey, keysForKeyId, keysForEnrollment, retireKey); it is fully self-describing (keyId/enrollmentId included) so it never needs an owning wrapper to be meaningful on its own.
AtKeysPassphraseEnvelopeCodec
Encodes/decodes the passphrase envelope that optionally wraps an atKeys document at rest:
AtOnboardingRequest
AtOnboardingResponse
Represents an onboarding response of an atSign.
AuthRequest
AuthResponse
CryptographicKeyType
Known values for AtKeysMaterial.keyPartType — the mechanical role a key material plays, independent of the algorithm family (see KeyAlgorithmType).
EnrollmentRequest
The BaseEnrollmentRequest class encapsulates shared fields between the InitialEnrollmentRequest and EnrollmentRequest.
EnrollmentRequestDecision
This class serves as the entity responsible for either approving or denying an enrollment request. The enrollment request is received through a notification from the server. The approving app has the authority to either grant or deny the request, with approval resulting in authentication and authorization to the requested namespaces.
FileAtKeysIo
File-backed .atKeys storage.
FirstEnrollmentRequest
The FirstEnrollmentRequest represents an enrollment request when onboarding (activating) an atSign.
GeneratedAtKeysIo
An interface that defines methods for AtKeys that can be generated. It can be implemented by classes that generate AtKeys using different methods, such as secure element.
InMemoryAtKeysIo
Stores AtKeys in process memory.
KeyAlgorithmType
Known values for AtKeysMaterial.keyAlgorithmType — the algorithm family used by a key material, independent of its cryptographic role (see CryptographicKeyType).
NamespacePermission
Model class representing a namespace permission. The string representation of the permission is namespace: {ns1: rw, ns2: r} where read is r and write is w and ns1/ns2 are the namespaces.
Otp
A model representing a one-time passcode (OTP) or semi-permanent passcode (SPP) along with its expiry time.
Registrar
RegistrarService
RetryOptions
ServerEnrollmentRequest
Holds details of an enrollment request received from the server.
WrittenAtKeysIo
An interface that defines methods for AtKeys that can be written. It can be implemented by classes that write AtKeys to different sources, such as file system or keychain.

Mixins

KeyIOMixin

Extensions

ActivateApiEndpointLegacy on RegistrarApiEndpoint
Backward compatibility extension for legacy enum values

Functions

encodeAtKeysDocument(Iterable<AtKeysMaterial> materials) List<Map<String, dynamic>>
Encodes a flat list of AtKeysMaterial into the typed-keys document's nested keys shape, grouping materials that share a keyId (e.g. the public+private halves of a keypair) and validating that every material in a group agrees on enrollmentId and doesn't repeat a keyPartType.
getDefaultAtKeysFilePath(String homeDirectory, String atsign) String
getHomeDirectory({bool throwIfNull = false}) String?
parseAtKeysDocument(List keysJson) List<AtKeysMaterial>
Parses the typed-keys document's keys array into a flat list of AtKeysMaterial, validating each entry's keyParts (no duplicate keyPartType within one keyId) and rejecting a keyId that repeats across separate entries.

Typedefs

ActivateApiEndpoint = RegistrarApiEndpoint
Legacy enum name for backward compatibility
EnrollmentBase = AtEnrollmentRecord
Backward compatibility for AtEnrollmentRecord
EnrollmentServerResponse = ServerEnrollmentRequest
Backwards-compatible alias for ServerEnrollmentRequest.