fix(auth): correct typos, add suppression, and improve documentation clarity

- Fixed minor typos in comments for `LoginViewModel`, `OidcCallback`, and `AuthApiClient`.
- Added `@Suppress("REDUNDANT_CALL_OF_CONVERSION_METHOD")` in `Sha256.kt`.
- Improved phrasing and readability of function documentation across files.

Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
2026-03-16 10:51:55 +01:00
parent 2c822f8007
commit f7743aa7d9
4 changed files with 7 additions and 5 deletions
@@ -36,7 +36,7 @@ class AuthApiClient(
) {
/**
* Authenticate user with username and password
* Authenticate a user with a username and password
*/
suspend fun login(username: String, password: String): LoginResponse {
val tokenEndpoint = "$keycloakBaseUrl/realms/$realm/protocol/openid-connect/token"
@@ -29,8 +29,8 @@ expect suspend fun launchOidcFlow(
/**
* Prüft beim App-Start, ob in der aktuellen URL ein OIDC-Callback steckt.
* Relevant für JS/Browser: nach Keycloak-Redirect enthält die URL code= und state=.
* Gibt null zurück, wenn kein Callback vorhanden.
* Relevant für JS/Browser: Nach Keycloak-Redirect enthält die URL code= und state=.
* Gibt null zurück, wenn kein Callback vorhanden ist.
*/
expect fun consumePendingOidcCallback(): OidcCallbackResult?
@@ -1,3 +1,5 @@
@file:Suppress("REDUNDANT_CALL_OF_CONVERSION_METHOD")
package at.mocode.frontend.core.auth.data
/**
@@ -160,7 +160,7 @@ class LoginViewModel(
}
}
/** Verarbeitet das Ergebnis des OIDC-Callbacks (intern + von JS-Startup). */
/** Verarbeitet das Ergebnis des OIDC-Callbacks (intern + von JS-Start-up). */
private suspend fun handleOidcCallbackResult(result: OidcCallbackResult) {
when (result) {
is OidcCallbackResult.Success -> {