PHPackages                             matthiasrousseau/guzzle-atlassian-connect-middleware - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. matthiasrousseau/guzzle-atlassian-connect-middleware

ActiveLibrary[HTTP &amp; Networking](/categories/http)

matthiasrousseau/guzzle-atlassian-connect-middleware
====================================================

An Atlassian Connect authentication middleware for Guzzle

1.1.2(6y ago)0159[5 PRs](https://github.com/MatthiasRousseauAdFab/guzzle-atlassian-connect-middleware/pulls)MITPHPPHP &gt;=5.6.0

Since Feb 17Pushed 3y ago1 watchersCompare

[ Source](https://github.com/MatthiasRousseauAdFab/guzzle-atlassian-connect-middleware)[ Packagist](https://packagist.org/packages/matthiasrousseau/guzzle-atlassian-connect-middleware)[ RSS](/packages/matthiasrousseau-guzzle-atlassian-connect-middleware/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (5)Versions (7)Used By (0)

adlogix/guzzle-atlassian-connect-middleware
===========================================

[](#adlogixguzzle-atlassian-connect-middleware)

[![build](https://camo.githubusercontent.com/e44a17d6adb0dceb77c618c3d7db469342122cd229b627b9df6a4cc0a4a40cc9/68747470733a2f2f7472617669732d63692e6f72672f61646c6f6769782f67757a7a6c652d61746c61737369616e2d636f6e6e6563742d6d6964646c65776172652e7376673f6272616e63683d6d6173746572)](https://camo.githubusercontent.com/e44a17d6adb0dceb77c618c3d7db469342122cd229b627b9df6a4cc0a4a40cc9/68747470733a2f2f7472617669732d63692e6f72672f61646c6f6769782f67757a7a6c652d61746c61737369616e2d636f6e6e6563742d6d6964646c65776172652e7376673f6272616e63683d6d6173746572) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/e7d3a2db47fea443cb96fd5d3167e8ca6e0081b6b7fec1612af767954717d692/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f61646c6f6769782f67757a7a6c652d61746c61737369616e2d636f6e6e6563742d6d6964646c65776172652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/adlogix/guzzle-atlassian-connect-middleware/?branch=master)

**The purpose of this middleware is to implement Atlassian Connect authentication as a Guzzle middleware. So you should read the [Atlassian Connect documentation](https://developer.atlassian.com/static/connect/docs/latest/index.html) to understand terms used in this library**

tl;dr;
------

[](#tldr)

- **JWT**: Json Web Token [standard](http://jwt.io/), [atlassian version](https://developer.atlassian.com/static/connect/docs/latest/concepts/understanding-jwt.html), [Atlassian JWT Web decoder](http://jwt-decoder.herokuapp.com/jwt/decode) (use your query to get the QSH, use the query + the JWT token query param to validate it)
- **QSH**: [Query String Hash](https://developer.atlassian.com/static/connect/docs/latest/concepts/understanding-jwt.html#qsh)
- **Descriptor**: [Add-on Descriptor for Atlassian Connect](https://developer.atlassian.com/static/connect/docs/latest/modules/), [validate your descriptor against an atlassian product](https://atlassian-connect-validator.herokuapp.com/validate) (syntax check only)

What it is
----------

[](#what-it-is)

As you may have seen, Atlassian has a pretty complex authentication system, even just for read access on any of their products. We created this Guzzle middleware in order to help us to authenticate on an Atlassian product.

What it is not
--------------

[](#what-it-is-not)

- A full Atlassian \[name-your-product\] client.

Usage
-----

[](#usage)

See the index.php at root of this repository.

Real life testing
-----------------

[](#real-life-testing)

The Atlassian Product you want to authenticate to needs to contact your application using some form of webhooks, so we created the most basic application we could do to show you how it can be accomplished.

Use docker-compose:

```
$ docker-compose up -d
```

### Use host names instead of ports

[](#use-host-names-instead-of-ports)

If you've launched the environment you already have a proxy running to redirect ngrok.dev and atlassian-connect.dev to the correct containers. You just have to put both domains to your host file or use a solution like [dnsmasq on OSX](https://passingcuriosity.com/2013/dnsmasq-dev-osx/), but be sure to redirect to your docker-machine IP.

To find your docker machine ip use:

```
$ docker-machine ip [machine-name]
```

### Get your development instance

[](#get-your-development-instance)

Atlassian changed the way to work on Confluence/Jira, now in order to create your plugin, you have to get a [Developer Account](http://go.atlassian.com/cloud-dev) and create your own instance. All the steps to create your environment are defined on the [documentation page](https://developer.atlassian.com/static/connect/docs/latest/guides/development-setup.html).

Once you have access to your own Atlassian Cloud instance and you put it in developer mode, we can continue and let the instance contact us.

### Exposing our local app to the world

[](#exposing-our-local-app-to-the-world)

The Atlassian app we trying to authenticate must post some information to us, so we need to expose our app on the internet. That's the reason we have a [ngrok](https://ngrok.com/) container running. ngrok is an application which will create a tunnel between our environment and their servers, letting us to be accessed from everywhere.

You should now have a ngrok container running at [ngrok.dev](http://ngrok.dev). When you connect you should see the tunnel url and, if you open it, all the tunnel trafic.

The url to use to install our demo application is https://\[your-tunnel-id\].eu.ngrok.io/descriptor.json

**Note:** Everytime you restart the ngrok container, the tunnel id will change, so you should reinstall your plugin each time. I know, it's bad.

### Proxy Timeout

[](#proxy-timeout)

We've setup a proxy timeout of 10 minutes so we can do line by line without problems ;)

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

Unknown

Total

1

Last Release

2277d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bdad50fb6df3d0d5ad75bd855cba2fea6c9b29da8fc707005af7e638d1cf546?d=identicon)[MatthiasRousseau](/maintainers/MatthiasRousseau)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![Matthias-Rousseau](https://avatars.githubusercontent.com/u/33620583?v=4)](https://github.com/Matthias-Rousseau "Matthias-Rousseau (1 commits)")

---

Tags

jwtmiddlewareGuzzleAuthenticationjiraconnectatlassianConfluenceQSH

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/matthiasrousseau-guzzle-atlassian-connect-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/matthiasrousseau-guzzle-atlassian-connect-middleware/health.svg)](https://phpackages.com/packages/matthiasrousseau-guzzle-atlassian-connect-middleware)
```

###  Alternatives

[lexik/jwt-authentication-bundle

This bundle provides JWT authentication for your Symfony REST API

2.6k58.7M210](/packages/lexik-jwt-authentication-bundle)[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43117.4M104](/packages/kevinrob-guzzle-cache-middleware)[shopify/shopify-api

Shopify API Library for PHP

4634.8M16](/packages/shopify-shopify-api)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21610.7M64](/packages/caseyamcl-guzzle-retry-middleware)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

28722.5k3](/packages/eljam-guzzle-jwt-middleware)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

842.3M17](/packages/rtheunissen-guzzle-log-middleware)

PHPackages © 2026

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