-
Notifications
You must be signed in to change notification settings - Fork 166
feat: add configurable biometric authentication policies for SecureCredentialsManager #867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
subhankarmaiti
wants to merge
12
commits into
main
Choose a base branch
from
SDK-6524-biometric-policy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+444
−5
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
8528a0f
feat: Add configurable biometric policies to SecureCredentialsManager
subhankarmaiti ed711a6
feat: Enhance biometric authentication with configurable policies and…
subhankarmaiti f6b41ba
feat: Update biometric policy to include default timeout and improve …
subhankarmaiti 797fd98
Merge branch 'main' of https://github.com/auth0/Auth0.Android into SD…
subhankarmaiti 2b80204
feat: Add unit tests for SecureCredentialsManager biometric policy ha…
subhankarmaiti 2867d4c
feat: Update examples to include session-based biometric policy usage
subhankarmaiti 7b9db65
refactor: Remove biometric policy options and related UI elements
subhankarmaiti 17f861a
fix: Ensure default biometric policy is applied when local authentica…
subhankarmaiti e97ee89
Merge branch 'main' into SDK-6524-biometric-policy
subhankarmaiti e619593
Merge branch 'main' of https://github.com/auth0/Auth0.Android into SD…
subhankarmaiti 1c32230
feat: Enhance biometric session management and update examples
subhankarmaiti 7d83882
Merge branch 'SDK-6524-biometric-policy' of https://github.com/auth0/…
subhankarmaiti File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
auth0/src/main/java/com/auth0/android/authentication/storage/BiometricPolicy.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| package com.auth0.android.authentication.storage | ||
|
|
||
| /** | ||
| * Defines the policy for when a biometric prompt should be shown when using SecureCredentialsManager. | ||
| */ | ||
| public sealed class BiometricPolicy { | ||
| /** | ||
| * Default behavior. A biometric prompt will be shown for every call to getCredentials(). | ||
| */ | ||
| public object Always : BiometricPolicy() | ||
|
|
||
| /** | ||
| * A biometric prompt will be shown only once within the specified timeout period. | ||
| * @param timeoutInSeconds The duration for which the session remains valid. | ||
| */ | ||
| public data class Session(val timeoutInSeconds: Int) : BiometricPolicy() | ||
|
|
||
| /** | ||
| * A biometric prompt will be shown only once while the app is in the foreground. | ||
| * The session is invalidated by calling clearBiometricSession() or after the default timeout. | ||
| * @param timeoutInSeconds The duration for which the session remains valid. Defaults to 3600 seconds (1 hour). | ||
| */ | ||
| public data class AppLifecycle @JvmOverloads constructor(val timeoutInSeconds: Int = 3600) : BiometricPolicy() // Default 1 hour | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.