Skip to content

Commit 755679a

Browse files
committed
Updated more kdocs and naming
1 parent 9baa6b4 commit 755679a

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

Shrine/app/src/main/java/com/authentication/shrine/CredentialManagerUtils.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ class CredentialManagerUtils @Inject constructor(
5151
/**
5252
* Retrieves a passkey or password from the credential manager.
5353
*
54-
* @param creationResult The result of the passkey creation operation.
54+
* @param publicKeyCredentialRequestOptions The public key credential request options.
5555
* @param context The activity context from the Composable, to be used in Credential Manager APIs
56-
* @return The [GetCredentialResponse] object containing the passkey, or null if an error occurred.
56+
* @return The [GetCredentialResponse] object containing the passkey or password, or null if an
57+
* error occurred.
5758
*/
5859
suspend fun getPasskeyOrPassword(
59-
creationResult: JSONObject,
60+
publicKeyCredentialRequestOptions: JSONObject,
6061
context: Context,
6162
): GenericCredentialManagerResponse {
6263
val passkeysEligibility = PasskeysEligibility.isPasskeySupported(context)
@@ -69,7 +70,7 @@ class CredentialManagerUtils @Inject constructor(
6970
val credentialRequest = GetCredentialRequest(
7071
listOf(
7172
GetPublicKeyCredentialOption(
72-
creationResult.toString(),
73+
publicKeyCredentialRequestOptions.toString(),
7374
null,
7475
),
7576
GetPasswordOption(),

Shrine/app/src/main/java/com/authentication/shrine/ui/RegisterScreen.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ import com.authentication.shrine.ui.viewmodel.RegistrationViewModel
8080
fun RegisterScreen(
8181
navigateToHome: (isSignInThroughPasskeys: Boolean) -> Unit,
8282
onLearnMoreClicked: () -> Unit,
83-
onOtherWaysToSignInClicked: () -> Unit,
83+
onOtherWaysToSignUpClicked: () -> Unit,
8484
onBackClicked: () -> Unit,
8585
viewModel: RegistrationViewModel,
8686
modifier: Modifier = Modifier,
@@ -124,7 +124,7 @@ fun RegisterScreen(
124124
fullName = fullName,
125125
onFullNameChanged = { fullName = it },
126126
onLearnMoreClicked = onLearnMoreClicked,
127-
onOtherWaysToSignInClicked = onOtherWaysToSignInClicked,
127+
onOtherWaysToSignUpClicked = onOtherWaysToSignUpClicked,
128128
onBackClicked = onBackClicked,
129129
email = email,
130130
onEmailChanged = { email = it },
@@ -151,7 +151,7 @@ fun RegisterScreen(
151151
fullName: String,
152152
onFullNameChanged: (String) -> Unit,
153153
onLearnMoreClicked: () -> Unit,
154-
onOtherWaysToSignInClicked: () -> Unit,
154+
onOtherWaysToSignUpClicked: () -> Unit,
155155
onBackClicked: () -> Unit,
156156
email: String,
157157
onEmailChanged: (String) -> Unit,
@@ -187,7 +187,7 @@ fun RegisterScreen(
187187
fullName = fullName,
188188
onFullNameChanged = onFullNameChanged,
189189
onLearnMoreClicked = onLearnMoreClicked,
190-
onOtherWaysToSignInClicked = onOtherWaysToSignInClicked,
190+
onOtherWaysToSignUpClicked = onOtherWaysToSignUpClicked,
191191
email = email,
192192
onEmailChanged = onEmailChanged,
193193
onPasskeyRegister = onPasskeyRegister,
@@ -224,7 +224,7 @@ private fun RegisterScreenInputSection(
224224
fullName: String,
225225
onFullNameChanged: (String) -> Unit,
226226
onLearnMoreClicked: () -> Unit,
227-
onOtherWaysToSignInClicked: () -> Unit,
227+
onOtherWaysToSignUpClicked: () -> Unit,
228228
email: String,
229229
onEmailChanged: (String) -> Unit,
230230
onPasskeyRegister: (String) -> Unit,
@@ -282,7 +282,7 @@ private fun RegisterScreenInputSection(
282282
modifier = Modifier.padding(top = dimensionResource(R.dimen.dimen_standard)),
283283
)
284284

285-
PasskeyInformationTab(onLearnMoreClicked, onOtherWaysToSignInClicked)
285+
PasskeyInformationTab(onLearnMoreClicked, onOtherWaysToSignUpClicked)
286286

287287
ShrineButton(
288288
onClick = { onPasskeyRegister(email) },
@@ -297,13 +297,13 @@ private fun RegisterScreenInputSection(
297297
* Composable for the Passkeys Information Tab UI Element
298298
*
299299
* @param onLearnMoreClicked lambda for more information, navigates to an informational screen
300-
* @param onOtherWaysToSignInClicked lambda for other sign in methods, navigates to
300+
* @param onOtherWaysToSignUpClicked lambda for other sign in methods, navigates to
301301
* @OtherOptionsSignInScreen
302302
* */
303303
@Composable
304304
private fun PasskeyInformationTab(
305305
onLearnMoreClicked: () -> Unit,
306-
onOtherWaysToSignInClicked: () -> Unit,
306+
onOtherWaysToSignUpClicked: () -> Unit,
307307
) {
308308
Column(
309309
modifier = Modifier
@@ -329,7 +329,7 @@ private fun PasskeyInformationTab(
329329
ShrineClickableText(
330330
text = "",
331331
clickableText = stringResource(R.string.other_ways_to_sign_up),
332-
onTextClick = onOtherWaysToSignInClicked,
332+
onTextClick = onOtherWaysToSignUpClicked,
333333
textStyle = TextStyle(color = Color(0xFF006B5F)),
334334
)
335335
}
@@ -353,7 +353,7 @@ fun RegisterScreenPreview() {
353353
RegisterScreen(
354354
onPasskeyRegister = { _ -> },
355355
onLearnMoreClicked = { },
356-
onOtherWaysToSignInClicked = { },
356+
onOtherWaysToSignUpClicked = { },
357357
onBackClicked = { },
358358
uiState = RegisterUiState(),
359359
fullName = "",

0 commit comments

Comments
 (0)