Download the PHP package wuninsu/nativephp-biometrics without Composer

On this page you can find all versions of the php package wuninsu/nativephp-biometrics. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package nativephp-biometrics

NativePHP Biometrics

Latest Version

Fingerprint, Face ID and Touch ID prompts for NativePHP Mobile v4 apps.

The prompt answers one question: is the phone's owner holding it? The fingerprint or face never reaches the app. To protect a secret behind the prompt, keep the secret itself in secure storage (for example wuninsu/nativephp-secure-storage), and use the prompt to decide whether the app may use it.

Early release (0.x). The PHP side is covered by tests and the Android code compiles against NativePHP Mobile 4.6. Testing on real phones is in progress, so the API may still change before 1.0.

Requirements

Install

NativePHP compiles only the plugins you register. If your app has no app/Providers/NativeServiceProvider.php yet, publish it first:

Then register the plugin and rebuild the native project:

The plugin adds NSFaceIDUsageDescription ("Use Face ID to unlock the app.") to the iOS Info.plist. Apple requires it before Face ID can be used.

Use

Can the phone do it?

Show the prompt

The prompt runs on the phone's screen, so its result arrives later, as the Wuninsu\NativeBiometrics\Events\Completed event.

Or listen for the event anywhere (a Laravel listener, or #[On] / #[OnNative] in a component):

$event->error is null on success, otherwise one of: cancelled, failed, lockout, not_enrolled, unavailable, timeout. A single unrecognised finger or face does not end the prompt; the phone lets the user try again.

Use ->id('…') to match the event to the prompt that started it, and ->event(MyEvent::class) to receive another event class (its constructor takes bool $success, ?string $id, ?string $error).

Only on the phone

The plugin's native code exists only in a real build (php artisan native:run or a release). It is not in the NativePHP Jump app, and there is no bridge on a web server or in tests. Biometrics::isAvailable() is true only inside a built app that contains this plugin.

Testing

Bridge functions

Function Parameters Returns
WuninsuBiometrics.Status none {available, biometry, reason?, deviceSecure}
WuninsuBiometrics.Prompt id, event, title, subtitle?, reason, cancel, allowDeviceCredential {started: true}, then the event {success, id, error}

License

MIT


All versions of nativephp-biometrics with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
nativephp/mobile Version ^4.6.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package wuninsu/nativephp-biometrics contains the following files

Loading the files please wait ...