Credentials

@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

Constructors

Link copied to clipboard
constructor(@Json(name = "user_id") userId: String, @Json(name = "access_token") accessToken: String, @Json(name = "refresh_token") refreshToken: String?, @Json(name = "home_server") homeServer: String?, @Json(name = "device_id") deviceId: String, @Json(name = "well_known") discoveryInformation: DiscoveryInformation? = null)

Properties

Link copied to clipboard

An access token for the account. This access token can then be used to authorize other requests.

Link copied to clipboard

ID of the logged-in device. Will be the same as the corresponding parameter in the request, if one was specified.

Link copied to clipboard

Optional client configuration provided by the server. If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within. This object takes the same form as the one returned from .well-known autodiscovery.

Link copied to clipboard

The server_name of the homeserver on which the account has been registered.

Link copied to clipboard

Not documented.

Link copied to clipboard

The fully-qualified Matrix ID that has been registered.