damax/api-auth-bundle

Authentication via api key or JWT.

v2.1.0 2019-02-17 15:23 UTC

This package is auto-updated.

Last update: 2024-04-21 18:17:09 UTC


README

Build Status Coverage Status Scrutinizer Code Quality

API key or JWT authentication for Symfony application.

Features

Api keys

  • Store keys in Redis, database or right in config.
  • Search in multiple storage types until found.
  • Use console commands to add, remove or lookup existing keys.
  • Define TTL for each key i.e. grant temporary access to your API.
  • Configure the chain of key extractors from cookie, query string or header.
  • Finally, implement your own ApiKeyUserProvider for custom solution.

JWT

  • Symmetric signing support for quick setup i.e. SSH keys are not required.
  • Add and validate all registered claims.
  • Extend payload with any public or custom claim.
  • Refresh token functionality.
  • Customize success or error responses.

Documentation

Topics:

Contribute

Install dependencies and run tests:

$ make