PHPackages                             rstgroup/behat-oauth2-context - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. rstgroup/behat-oauth2-context

ActiveLibrary[Testing &amp; Quality](/categories/testing)

rstgroup/behat-oauth2-context
=============================

Behat Context for OAuth2

2.0.0(8y ago)102.8k4[1 issues](https://github.com/rstgroup/behat-oauth2-context/issues)MITPHPPHP &gt;=7.0

Since Oct 1Pushed 8y ago5 watchersCompare

[ Source](https://github.com/rstgroup/behat-oauth2-context)[ Packagist](https://packagist.org/packages/rstgroup/behat-oauth2-context)[ RSS](/packages/rstgroup-behat-oauth2-context/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (3)Versions (4)Used By (0)

Behat OAuth2
============

[](#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
------------

[](#requirements)

Library is only supported on PHP 5.4.0 and up.

For others requirements please see the [composer.json](composer.json) file.

Installation
------------

[](#installation)

1. Add the following to your `composer.json`,

    ```
    "require": {
        "rstgroup/behat-oauth2-context": "^1.0"
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:rstgroup/behat-oauth2-context.git"
        }
    ]
    ```
2. Run `composer update rstgroup/behat-oauth2-context` to ensure the library is installed.

Configuration
-------------

[](#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:

```
    paths:
        - %paths.base%/features
```

to right current path for example:

```
    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

[](#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
---------

[](#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

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~693 days

Total

2

Last Release

3232d ago

Major Versions

1.1.0 → 2.0.02017-08-24

PHP version history (2 changes)1.1.0PHP &gt;=5.4.0

2.0.0PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6ffa5d2fe34b04844f854a4fa7ce073c69a500fe6352d69461756abf1b23599d?d=identicon)[rstgroup](/maintainers/rstgroup)

---

Top Contributors

[![michalkopacz](https://avatars.githubusercontent.com/u/194026?v=4)](https://github.com/michalkopacz "michalkopacz (3 commits)")[![snapshotpl](https://avatars.githubusercontent.com/u/312655?v=4)](https://github.com/snapshotpl "snapshotpl (2 commits)")

---

Tags

behatbehat-contextbehat-oauth2behavior-driven-developmentoauth2

### Embed Badge

![Health badge](/badges/rstgroup-behat-oauth2-context/health.svg)

```
[![Health](https://phpackages.com/badges/rstgroup-behat-oauth2-context/health.svg)](https://phpackages.com/packages/rstgroup-behat-oauth2-context)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k532.1M2.5k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k34](/packages/neuron-core-neuron-ai)[drupal/drupal-extension

Drupal extension for Behat

21115.5M166](/packages/drupal-drupal-extension)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[imbo/behat-api-extension

API extension for Behat

1092.6M9](/packages/imbo-behat-api-extension)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
