Package-level declarations

Types

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class Credentials(@Json(name = "user_id") val userId: String, @Json(name = "access_token") val accessToken: String, @Json(name = "refresh_token") val refreshToken: String?, @Json(name = "home_server") val homeServer: String?, @Json(name = "device_id") val deviceId: String, @Json(name = "well_known") val discoveryInformation: DiscoveryInformation? = null)

This data class hold credentials user data. You shouldn't have to instantiate it. The access token should be use to authenticate user in all server requests. Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-login

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class DelegatedAuthConfig(@Json(name = "issuer") val issuer: String, @Json(name = "account") val accountManagementUrl: String)

https://github.com/matrix-org/matrix-spec-proposals/pull/2965

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class DiscoveryInformation(@Json(name = "m.homeserver") val homeServer: WellKnownBaseConfig? = null, @Json(name = "m.identity_server") val identityServer: WellKnownBaseConfig? = null, @Json(name = "io.element.disable_network_constraint") val disableNetworkConstraint: Boolean? = null)

This is a light version of Wellknown model, used for login response Ref: https://matrix.org/docs/spec/client_server/latest#post-matrix-client-r0-login

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class HomeServerConnectionConfig(val homeServerUri: Uri, val homeServerUriBase: Uri = homeServerUri, val identityServerUri: Uri? = null, val antiVirusServerUri: Uri? = null, val allowedFingerprints: List<Fingerprint> = emptyList(), val shouldPin: Boolean = false, val tlsVersions: List<TlsVersion>? = null, val tlsCipherSuites: List<CipherSuite>? = null, val shouldAcceptTlsExtensions: Boolean = true, val allowHttpExtension: Boolean = false, val forceUsageTlsVersions: Boolean = false)

This data class holds how to connect to a specific Homeserver. It's used with org.matrix.android.sdk.api.auth.AuthenticationService class. You should use the Builder to create one.

Link copied to clipboard
data class LocalizedFlowDataLoginTerms(val policyName: String?, val version: String?, val localizedUrl: String?, val localizedName: String?) : Parcelable

This class represent a localized privacy policy for registration Flow.

Link copied to clipboard
data class LoginFlowResult(val supportedLoginTypes: List<String>, val ssoIdentityProviders: List<SsoIdentityProvider>?, val isLoginAndRegistrationSupported: Boolean, val homeServerUrl: String, val isOutdatedHomeserver: Boolean, val hasOidcCompatibilityFlow: Boolean, val isLogoutDevicesSupported: Boolean, val isLoginWithQrSupported: Boolean)
Link copied to clipboard
Link copied to clipboard
data class SessionParams(val credentials: Credentials, val homeServerConnectionConfig: HomeServerConnectionConfig, val isTokenValid: Boolean, val loginType: LoginType)

This data class holds necessary data to open a session. You don't have to manually instantiate it.

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class SsoIdentityProvider(@Json(name = "id") val id: String, @Json(name = "name") val name: String?, @Json(name = "icon") val iconUrl: String?, @Json(name = "brand") val brand: String?) : Parcelable, Comparable<SsoIdentityProvider>
Link copied to clipboard
@JsonClass(generateAdapter = true)
data class WellKnown(@Json(name = "m.homeserver") val homeServer: WellKnownBaseConfig? = null, @Json(name = "m.identity_server") val identityServer: WellKnownBaseConfig? = null, @Json(name = "m.integrations") val integrations: JsonDict? = null, @Json(name = "org.matrix.msc2965.authentication") val unstableDelegatedAuthConfig: DelegatedAuthConfig? = null, @Json(name = "io.element.disable_network_constraint") val disableNetworkConstraint: Boolean? = null)

https://matrix.org/docs/spec/client_server/r0.4.0.html#server-discovery

Link copied to clipboard
@JsonClass(generateAdapter = true)
data class WellKnownBaseConfig(@Json(name = "base_url") val baseURL: String? = null)

https://matrix.org/docs/spec/client_server/r0.4.0.html#server-discovery