cnam / jwt-api-extension
Behat extension for testing api secure with jwt token base in Behat WebApiExtension
Installs: 632
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 6
Open Issues: 0
Type:behat-extension
Requires
- php: >=5.4
- behat/behat: ~3.0
- firebase/php-jwt: 1.0.0
- guzzlehttp/guzzle: 4.*
- phpunit/phpunit: ~4.0
Requires (Dev)
- cnam/security-jwt-service-provider: 0.0.6
- silex/silex: ~2.0@dev
This package is auto-updated.
Last update: 2024-12-27 03:33:54 UTC
README
Behat extension for testing api secure with jwt token
forked from Behat/WebApiExtension
Added methods
Then I am authenticating with jwt token as "admin"
And response should contain jwt token in field "token"
And response should contain jwt token in field "token" with data
examples tests/features
usage
Installation
composer install cnam/jwt-api-extension:0.0.1
OR update your composer.json add
require "cnam/jwt-api-extension":"0.0.1"
Configure behat.yml
default: formatters: progress: true pretty: true extensions: Behat\JwtApiExtension\ServiceContainer\JwtApiExtension: base_url: http://mockserver.test/ secret_key: Very_secret_key header_name: X-Access-Token encoded_field_name: name token_prefix: '' ttl: 86400 suites: jwt_suite: paths: [ %paths.base%/tests/features ] contexts: ['Behat\JwtApiExtension\Context\JwtApiContext']