Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rstgroup/behat-oauth2-context
This library include Behat context with implemented steps and features to test common use case of server with OAuth2
https://github.com/rstgroup/behat-oauth2-context
behat behat-context behat-oauth2 behavior-driven-development oauth2
Last synced: about 1 month ago
JSON representation
This library include Behat context with implemented steps and features to test common use case of server with OAuth2
- Host: GitHub
- URL: https://github.com/rstgroup/behat-oauth2-context
- Owner: rstgroup
- Created: 2015-08-13T09:21:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-01-31T09:36:30.000Z (almost 7 years ago)
- Last Synced: 2024-11-22T17:40:18.225Z (about 2 months ago)
- Topics: behat, behat-context, behat-oauth2, behavior-driven-development, oauth2
- Language: PHP
- Homepage: http://rst.com.pl/
- Size: 16.6 KB
- Stars: 10
- Watchers: 7
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Behat OAuth2
This library include Behat context with implemented steps and features to test common use case of server with OAuth2 ([The OAuth 2.0 Authorization Framework standards](https://tools.ietf.org/html/rfc6749))
## Requirements
Library is only supported on PHP 5.4.0 and up.
For others requirements please see the [composer.json](composer.json) file.
## Installation
1. Add the following to your `composer.json`,
```json
"require": {
"rstgroup/behat-oauth2-context": "^1.0"
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:rstgroup/behat-oauth2-context.git"
}
]
```2. Run `composer update rstgroup/behat-oauth2-context` to ensure the library is installed.
## Configuration
Copy `behat.yml.dist` file as `behat.yml` to your home project directory or copy contents from this file to your yml file with Behat tests.
You must replace sample content to right option:
```php
paths:
- %paths.base%/features
```
to right current path
for example:
```php
paths:
- %paths.base%/vendor/rstgroup/behat-oauth2-context/features/
```
And next you must replace parameters option:
- `token_url` - your url to token
- `oauth2` - your data for OAuth2 authorization### Recommended and optional parameters
In configuration we added two parameters recommended and optional. Their options are exists in OAuth2 RFC.
You can change their values to false if you know that your server doesn't send someone.## Run Tests
For run tests you must use Behat. You can read about it in [Behat documentation](http://behat.readthedocs.org/en/v3.0/).
Sample run:
```
vendor/bin/behat --config behat.yml
```