Skip to content

Commit

Permalink
Use "biometrics" instead of "biometry"
Browse files Browse the repository at this point in the history
  • Loading branch information
hvge committed Sep 21, 2023
1 parent bba6359 commit ae7259b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ xcuserdata
*.xcuserstate
*.xcscmblueprint

## VSCode
.vscode

## Obj-C/Swift specific
*.hmap
*.ipa
Expand Down
6 changes: 3 additions & 3 deletions docs/PowerAuth-SDK-for-Android.md
Original file line number Diff line number Diff line change
Expand Up @@ -1772,7 +1772,7 @@ In order to obtain an encrypted biometry factor-related key for the purpose of a
<!-- begin codetabs Kotlin Java -->
```kotlin
// Authenticate user with biometry and obtain encrypted biometry factor related key.
powerAuthSDK.authenticateUsingBiometry(context, fragment, "Sign in", "Use the biometric sensor on your device to continue", object: IAuthenticateWithBiometryListener {
powerAuthSDK.authenticateUsingBiometrics(context, fragment, "Sign in", "Use the biometric sensor on your device to continue", object: IAuthenticateWithBiometricsListener {
override fun onBiometricDialogCancelled(userCancel: Boolean) {
// User cancelled the operation
}
Expand All @@ -1788,7 +1788,7 @@ powerAuthSDK.authenticateUsingBiometry(context, fragment, "Sign in", "Use the bi
```
```java
// Authenticate user with biometry and obtain encrypted biometry factor related key.
powerAuthSDK.authenticateUsingBiometry(context, fragment, "Sign in", "Use the biometric sensor on your device to continue", new IAuthenticateWithBiometryListener() {
powerAuthSDK.authenticateUsingBiometrics(context, fragment, "Sign in", "Use the biometric sensor on your device to continue", new IAuthenticateWithBiometricsListener() {
@Override
public void onBiometricDialogCancelled(boolean userCancel) {
// User cancelled the operation
Expand Down Expand Up @@ -1889,7 +1889,7 @@ When the error dialog is disabled, your application should inform the user of th

```kotlin
// Authenticate user with biometry and obtain encrypted biometry factor related key.
powerAuthSDK.authenticateUsingBiometry(context, fragment, "Sign in", "Use the biometric sensor on your device to continue", object: IAuthenticateWithBiometryListener {
powerAuthSDK.authenticateUsingBiometrics(context, fragment, "Sign in", "Use the biometric sensor on your device to continue", object: IAuthenticateWithBiometricsListener {
override fun onBiometricDialogCancelled(userCancel: Boolean) {
// User or system cancelled the operation
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Interface used as a callback for biometric authentication for general application use.
*/
public interface IAuthenticateWithBiometryListener {
public interface IAuthenticateWithBiometricsListener {
/**
* Biometric authentication dialog was cancelled by the user or externally, by calling {@code cancel()}
* on cancelable object returned from authenticate() method.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ private ICancelable persistActivationWithBiometryImpl(
@NonNull String description,
@NonNull final Password password,
final @NonNull IPersistActivationWithBiometryListener callback) {
return authenticateUsingBiometry(context, fragmentHelper, title, description, true, new IBiometricAuthenticationCallback() {
return authenticateUsingBiometrics(context, fragmentHelper, title, description, true, new IBiometricAuthenticationCallback() {
@Override
public void onBiometricDialogCancelled(boolean userCancel) {
if (userCancel) {
Expand Down Expand Up @@ -2067,7 +2067,7 @@ private ICancelable addBiometryFactorImpl(
public void onFetchEncryptedVaultUnlockKeySucceed(final String encryptedEncryptionKey) {
if (encryptedEncryptionKey != null) {
// Authenticate using biometry to generate a key
final ICancelable biometricAuthentication = authenticateUsingBiometry(context, fragmentHelper, title, description, true, new IBiometricAuthenticationCallback() {
final ICancelable biometricAuthentication = authenticateUsingBiometrics(context, fragmentHelper, title, description, true, new IBiometricAuthenticationCallback() {
@Override
public void onBiometricDialogCancelled(boolean userCancel) {
if (userCancel) {
Expand Down Expand Up @@ -2302,7 +2302,7 @@ public void onCancel() {

/**
* Authenticate a client using biometric authentication. In case of the authentication is successful and
* {@link IAuthenticateWithBiometryListener#onBiometricDialogSuccess(PowerAuthAuthentication)} callback is called.
* {@link IAuthenticateWithBiometricsListener#onBiometricDialogSuccess(PowerAuthAuthentication)} callback is called.
*
* @param context Context.
* @param fragment The fragment of the application that will host the prompt.
Expand All @@ -2313,18 +2313,18 @@ public void onCancel() {
*/
@UiThread
@NonNull
public ICancelable authenticateUsingBiometry(
public ICancelable authenticateUsingBiometrics(
@NonNull Context context,
@NonNull Fragment fragment,
@NonNull String title,
@NonNull String description,
final @NonNull IAuthenticateWithBiometryListener listener) {
return authenticateUsingBiometry(context, FragmentHelper.from(fragment), title, description, false, getBiometricCallbackWithListener(listener));
final @NonNull IAuthenticateWithBiometricsListener listener) {
return authenticateUsingBiometrics(context, FragmentHelper.from(fragment), title, description, false, getBiometricCallbackWithListener(listener));
}

/**
* Authenticate a client using biometric authentication. In case of the authentication is successful and
* {@link IAuthenticateWithBiometryListener#onBiometricDialogSuccess(PowerAuthAuthentication)} callback is called.
* {@link IAuthenticateWithBiometricsListener#onBiometricDialogSuccess(PowerAuthAuthentication)} callback is called.
*
* @param context Context.
* @param fragmentActivity The activity of the application that will host the prompt.
Expand All @@ -2335,13 +2335,13 @@ public ICancelable authenticateUsingBiometry(
*/
@UiThread
@NonNull
public ICancelable authenticateUsingBiometry(
public ICancelable authenticateUsingBiometrics(
@NonNull Context context,
@NonNull FragmentActivity fragmentActivity,
@NonNull String title,
@NonNull String description,
final @NonNull IAuthenticateWithBiometryListener listener) {
return authenticateUsingBiometry(context, FragmentHelper.from(fragmentActivity), title, description, false, getBiometricCallbackWithListener(listener));
final @NonNull IAuthenticateWithBiometricsListener listener) {
return authenticateUsingBiometrics(context, FragmentHelper.from(fragmentActivity), title, description, false, getBiometricCallbackWithListener(listener));
}

/**
Expand All @@ -2350,7 +2350,7 @@ public ICancelable authenticateUsingBiometry(
* @return Instance of {@link IBiometricAuthenticationCallback}.
*/
@NonNull
private IBiometricAuthenticationCallback getBiometricCallbackWithListener(@NonNull IAuthenticateWithBiometryListener listener) {
private IBiometricAuthenticationCallback getBiometricCallbackWithListener(@NonNull IAuthenticateWithBiometricsListener listener) {
return new IBiometricAuthenticationCallback() {
@Override
public void onBiometricDialogCancelled(boolean userCancel) {
Expand Down Expand Up @@ -2380,7 +2380,7 @@ public void onBiometricDialogFailed(@NonNull PowerAuthErrorException error) {
* @param description Dialog description.
* @param callback Callback with the authentication result.
* @return {@link ICancelable} object associated with the biometric prompt.
* @deprecated Use {@link #authenticateUsingBiometry(Context, Fragment, String, String, IAuthenticateWithBiometryListener)} as a replacement.
* @deprecated Use {@link #authenticateUsingBiometrics(Context, Fragment, String, String, IAuthenticateWithBiometricsListener)} as a replacement.
*/
@UiThread
@NonNull
Expand All @@ -2391,7 +2391,7 @@ public ICancelable authenticateUsingBiometry(
@NonNull String title,
@NonNull String description,
final @NonNull IBiometricAuthenticationCallback callback) {
return authenticateUsingBiometry(context, FragmentHelper.from(fragment), title, description, false, callback);
return authenticateUsingBiometrics(context, FragmentHelper.from(fragment), title, description, false, callback);
}

/**
Expand All @@ -2404,7 +2404,7 @@ public ICancelable authenticateUsingBiometry(
* @param description Dialog description.
* @param callback Callback with the authentication result.
* @return {@link ICancelable} object associated with the biometric prompt.
* @deprecated Use {@link #authenticateUsingBiometry(Context, FragmentActivity, String, String, IAuthenticateWithBiometryListener)} as a replacement.
* @deprecated Use {@link #authenticateUsingBiometrics(Context, FragmentActivity, String, String, IAuthenticateWithBiometricsListener)} as a replacement.
*/
@UiThread
@NonNull
Expand All @@ -2415,7 +2415,7 @@ public ICancelable authenticateUsingBiometry(
@NonNull String title,
@NonNull String description,
final @NonNull IBiometricAuthenticationCallback callback) {
return authenticateUsingBiometry(context, FragmentHelper.from(fragmentActivity), title, description, false, callback);
return authenticateUsingBiometrics(context, FragmentHelper.from(fragmentActivity), title, description, false, callback);
}

/**
Expand All @@ -2431,7 +2431,7 @@ public ICancelable authenticateUsingBiometry(
*/
@UiThread
@NonNull
private ICancelable authenticateUsingBiometry(
private ICancelable authenticateUsingBiometrics(
final @NonNull Context context,
final @NonNull FragmentHelper fragmentHelper,
final @NonNull String title,
Expand Down

0 comments on commit ae7259b

Please sign in to comment.