-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/.idea/ | ||
dist/ | ||
|
||
android/.idea/* | ||
ios/Plugin.xcworkspace/xcuserdata | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
export declare enum BiometryType { | ||
NONE = 0, | ||
TOUCH_ID = 1, | ||
FACE_ID = 2, | ||
FINGERPRINT = 3, | ||
FACE_AUTHENTICATION = 4, | ||
IRIS_AUTHENTICATION = 5, | ||
MULTIPLE = 6 | ||
} | ||
export interface Credentials { | ||
username: string; | ||
password: string; | ||
} | ||
export interface IsAvailableOptions { | ||
/** | ||
* Specifies if should fallback to passcode authentication if biometric authentication is not available. | ||
*/ | ||
useFallback: boolean; | ||
} | ||
export interface AvailableResult { | ||
isAvailable: boolean; | ||
biometryType: BiometryType; | ||
errorCode?: number; | ||
} | ||
export interface BiometricOptions { | ||
reason?: string; | ||
title?: string; | ||
subtitle?: string; | ||
description?: string; | ||
negativeButtonText?: string; | ||
useFallback?: boolean; | ||
/** | ||
* Only for Android. | ||
* Set a maximum number of attempts for biometric authentication. The maximum allowed by android is 5. | ||
* @default 1 | ||
*/ | ||
maxAttempts?: number; | ||
} | ||
export interface GetCredentialOptions { | ||
server: string; | ||
} | ||
export interface SetCredentialOptions { | ||
username: string; | ||
password: string; | ||
server: string; | ||
} | ||
export interface DeleteCredentialOptions { | ||
server: string; | ||
} | ||
export interface NativeBiometricPlugin { | ||
isAvailable(options?: IsAvailableOptions): Promise<AvailableResult>; | ||
verifyIdentity(options?: BiometricOptions): Promise<any>; | ||
getCredentials(options: GetCredentialOptions): Promise<Credentials>; | ||
setCredentials(options: SetCredentialOptions): Promise<any>; | ||
deleteCredentials(options: DeleteCredentialOptions): Promise<any>; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import type { NativeBiometricPlugin } from './definitions'; | ||
declare const NativeBiometric: NativeBiometricPlugin; | ||
export * from './definitions'; | ||
export { NativeBiometric }; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { WebPlugin } from "@capacitor/core"; | ||
import { NativeBiometricPlugin, AvailableResult, BiometricOptions, GetCredentialOptions, SetCredentialOptions, DeleteCredentialOptions, Credentials } from "./definitions"; | ||
export declare class NativeBiometricWeb extends WebPlugin implements NativeBiometricPlugin { | ||
constructor(); | ||
isAvailable(): Promise<AvailableResult>; | ||
verifyIdentity(_options?: BiometricOptions): Promise<any>; | ||
getCredentials(_options: GetCredentialOptions): Promise<Credentials>; | ||
setCredentials(_options: SetCredentialOptions): Promise<any>; | ||
deleteCredentials(_options: DeleteCredentialOptions): Promise<any>; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.