Skip to content

Commit 80b39f3

Browse files
refactor: remove biometricPolicy parameter from SecureCredentialsManager constructor
1 parent ddb9db0 commit 80b39f3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

auth0/src/main/java/com/auth0/android/authentication/storage/SecureCredentialsManager.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
4545
private val fragmentActivity: WeakReference<FragmentActivity>? = null,
4646
private val localAuthenticationOptions: LocalAuthenticationOptions? = null,
4747
private val localAuthenticationManagerFactory: LocalAuthenticationManagerFactory? = null,
48-
private val biometricPolicy: BiometricPolicy = BiometricPolicy.Always,
4948
) : BaseCredentialsManager(apiClient, storage, jwtDecoder) {
5049
private val gson: Gson = GsonProvider.gson
5150

@@ -95,8 +94,7 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
9594
auth0.executor,
9695
WeakReference(fragmentActivity),
9796
localAuthenticationOptions,
98-
DefaultLocalAuthenticationManagerFactory(),
99-
localAuthenticationOptions?.policy ?: BiometricPolicy.Always
97+
DefaultLocalAuthenticationManagerFactory()
10098
)
10199

102100
/**
@@ -1139,7 +1137,8 @@ public class SecureCredentialsManager @VisibleForTesting(otherwise = VisibleForT
11391137
val lastAuth = lastBiometricAuthTime.get()
11401138
if (lastAuth == NO_SESSION) return false // No session exists
11411139

1142-
return when (val policy = biometricPolicy) {
1140+
val policy = localAuthenticationOptions?.policy ?: BiometricPolicy.Always
1141+
return when (policy) {
11431142
is BiometricPolicy.Session,
11441143
is BiometricPolicy.AppLifecycle -> {
11451144
val timeoutMillis = when (policy) {

0 commit comments

Comments
 (0)