# Installation

This framework contains several sub-packages that you don’t necessarily need. It is highly recommended to install what you need and not the whole framework.

The preferred way to install the library you need is to use composer:

```bash
composer require web-auth/webauthn-lib
```

If you use Symfony, you may be interested in the bundle and, optionally,  the Stimulus component.

```sh
composer require web-auth/webauthn-symfony-bundle web-auth/webauthn-stimulus
```

Hereafter the dependency tree:

* `web-auth/webauthn-lib`: this is the core library. This package can be used in any PHP project or within any popular framework (Laravel, CakePHP…)
* `web-auth/webauthn-symfony-bundle`: this is a Symfony bundle that ease the integration of this authentication mechanism in your Symfony project.

The core library also depends on `web-auth/cose-lib` and `web-auth/metadata-service`. What are these dependencies?

`web-auth/cose-lib` contains several cipher algorithms and COSE key support to verify the digital signatures sent by the authenticators during the creation and authentication ceremonies. These algorithms are compliant with the [RFC8152](https://tools.ietf.org/html/rfc8152). This library can be used by any other PHP projects. At the moment only signature algorithms are available, but it is planned to add encryption algorithms.

`web-auth/metadata-service` provides classes to support the [Fido Alliance Metadata Service](https://fidoalliance.org/metadata/). If you plan to use Attestation Statements during the creation ceremony, this service is mandatory. Please note that Attestation Statements decreases the user privacy as they may leak data that allow to identify a specific user. **The use of Attestation Statements and this service are generally not recommended unless you REALLY need this information**. This library can also be used by any other PHP projects.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://webauthn-doc.spomky-labs.com/v4.7/the-project/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
