Package-level declarations

Types

Link copied to clipboard
@Serializable(with = ApplicationType.Serializer::class)
sealed interface ApplicationType
Link copied to clipboard
@Serializable
data class LocalizedField<T>(val default: T? = null, val translations: Map<String, T>? = null)
Link copied to clipboard
abstract class LocalizedObjectSerializer<T>(delegate: KSerializer<T>) : JsonTransformingSerializer<T>
Link copied to clipboard
interface OAuth2LoginFlow

Represents the flow for handling OAuth 2.0 login operations. This interface provides methods to facilitate the redirection and callback required during the OAuth 2.0 authorization process.

Link copied to clipboard
class OAuth2LoginFlowImpl(baseUrl: Url, applicationType: ApplicationType, clientUri: String, redirectUri: String, responseMode: ResponseMode = ResponseMode.Fragment, clientName: LocalizedField<String>? = null, logoUri: LocalizedField<String>? = null, policyUri: LocalizedField<String>? = null, tosUri: LocalizedField<String>? = null, promptValue: PromptValue? = null, initialState: OAuth2LoginFlow.AuthRequestData.State? = null, httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null) : OAuth2LoginFlow
Link copied to clipboard
class OAuth2MatrixClientAuthProvider(val baseUrl: Url, store: MatrixClientAuthProviderDataStore, onLogout: suspend (LogoutInfo) -> Unit, httpClientEngine: HttpClientEngine?, httpClientConfig: HttpClientConfig<*>.() -> Unit?) : BearerClientAuthProvider<OAuth2MatrixClientAuthProviderData>
Link copied to clipboard
@Serializable
data class OAuth2MatrixClientAuthProviderData(val baseUrl: Url, val accessToken: String, val accessTokenExpiresInS: Long?, val refreshToken: String?, val clientId: String, val scope: Set<Scope>?) : MatrixClientAuthProviderData, BearerTokens
Link copied to clipboard
@Serializable(with = Scope.Serializer::class)
sealed interface Scope
Link copied to clipboard
@Serializable(with = TokenResponse.Serializer::class)
data class TokenResponse(val accessToken: String, val refreshToken: String? = null, val tokenType: String, val expiresIn: Long? = null, val scope: Set<Scope>? = null)

Functions

Link copied to clipboard
fun MatrixClientAuthProviderData.Companion.oAuth2(baseUrl: Url, clientId: String, accessToken: String, accessTokenExpiresInS: Long? = null, refreshToken: String? = null, scope: Set<Scope>? = null): OAuth2MatrixClientAuthProviderData
Link copied to clipboard
fun MatrixClientAuthProviderData.Companion.oAuth2Login(baseUrl: Url, applicationType: ApplicationType, clientUri: String, redirectUri: String, responseMode: ResponseMode = ResponseMode.Fragment, clientName: LocalizedField<String>? = null, logoUri: LocalizedField<String>? = null, policyUri: LocalizedField<String>? = null, tosUri: LocalizedField<String>? = null, promptValue: PromptValue? = null, initialState: OAuth2LoginFlow.AuthRequestData.State? = null, httpClientEngine: HttpClientEngine? = null, httpClientConfig: HttpClientConfig<*>.() -> Unit? = null): OAuth2LoginFlow