flipboxfactory / craft-jwt

JWT for Craft CMS
MIT License
11 stars 2 forks source link

Add ability to customize JWT filter header / schema #2

Closed nateiler closed 2 years ago

nateiler commented 2 years ago

The header filter assumes:

  1. Authorization header is to be used
  2. A schema is required.

This limits the types of headers to use in modern web applications

nateiler commented 2 years ago

Closed via https://github.com/flipboxfactory/craft-jwt/releases/tag/1.1.0

To configure the use with header X-Access-Token: {{some_token_value}} the filter class configuration would look like:

[
    'class' => \flipbox\craft\jwt\filters\JwtHttpBearerAuth::class,
    'header' => 'X-Access-Token',
    'schema' => null
]