android-components / mozilla.components.concept.sync / SyncAuthInfo

SyncAuthInfo

data class SyncAuthInfo (source)

A Firefox Sync friendly auth object which can be obtained from OAuthAccount.

Why is there a Firefox Sync-shaped authentication object at the concept level, you ask? Mainly because this is what the SyncableStore consumes in order to actually perform synchronization, which is in turn implemented by places-backed storage layer. If this class lived in services-firefox-accounts, we’d end up with an ugly dependency situation between services and storage components.

Turns out that building a generic description of an authentication/synchronization layer is not quite the way to go when you only have a single, legacy implementation.

However, this may actually improve once we retire the tokenserver from the architecture. We could also consider a heavier use of generics, as well.

Constructors

Name Summary
<init> SyncAuthInfo(kid: String, fxaAccessToken: String, fxaAccessTokenExpiresAt: Long, syncKey: String, tokenServerUrl: String)
A Firefox Sync friendly auth object which can be obtained from OAuthAccount.

Properties

Name Summary
fxaAccessToken val fxaAccessToken: String
fxaAccessTokenExpiresAt val fxaAccessTokenExpiresAt: Long
kid val kid: String
syncKey val syncKey: String
tokenServerUrl val tokenServerUrl: String

Extension Functions

Name Summary
into fun SyncAuthInfo.into(): SyncUnlockInfo
Conversion from a generic AuthInfo type into a type ‘logins’ lib uses at the interface boundary.
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.