From 51fd45d3177f4be1af52ed6e96db2852aa1dec4f Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 17 Feb 2021 17:30:13 +0100 Subject: [PATCH] typo and doc --- .../org/matrix/android/sdk/api/auth/AuthenticationService.kt | 2 +- .../sdk/internal/auth/DefaultAuthenticationService.kt | 5 +++++ .../main/java/im/vector/app/features/login/LoginViewModel.kt | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/AuthenticationService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/AuthenticationService.kt index 09ac140db6..a7f5163774 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/AuthenticationService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/AuthenticationService.kt @@ -30,7 +30,7 @@ import org.matrix.android.sdk.api.session.Session interface AuthenticationService { /** * Request the supported login flows for this homeserver. - * This is the first method to call to be able to get a wizard to login or the create an account + * This is the first method to call to be able to get a wizard to login or to create an account */ suspend fun getLoginFlow(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/DefaultAuthenticationService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/DefaultAuthenticationService.kt index ec64b7e757..4f3451cf30 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/DefaultAuthenticationService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/auth/DefaultAuthenticationService.kt @@ -130,6 +130,11 @@ internal class DefaultAuthenticationService @Inject constructor( ?.trim { it == '/' } } + /** + * This is the entry point of the authentication service. + * homeServerConnectionConfig contains a homeserver URL probably entered by the user, which can be a + * valid homeserver API url, the url of Element Web, or anything else. + */ override suspend fun getLoginFlow(homeServerConnectionConfig: HomeServerConnectionConfig): LoginFlowResult { pendingSessionData = null diff --git a/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt b/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt index fa1a504041..72da28230e 100644 --- a/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/login/LoginViewModel.kt @@ -146,7 +146,7 @@ class LoginViewModel @AssistedInject constructor( } private fun handleUserAcceptCertificate(action: LoginAction.UserAcceptCertificate) { - // It happen when we get the login flow, or during direct authentication. + // It happens when we get the login flow, or during direct authentication. // So alter the homeserver config and retrieve again the login flow when (val finalLastAction = lastAction) { is LoginAction.UpdateHomeServer -> {