PHPackages                             bmwcarit/silex-jira-oauth-provider - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. bmwcarit/silex-jira-oauth-provider

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

bmwcarit/silex-jira-oauth-provider
==================================

A silex service provider that allows oauth authentication with Atlassian JIRA

v1.0.1(10y ago)114634[1 PRs](https://github.com/bmwcarit/silex-jira-oauth-provider/pulls)1MITPHP

Since Mar 2Pushed 4y ago7 watchersCompare

[ Source](https://github.com/bmwcarit/silex-jira-oauth-provider)[ Packagist](https://packagist.org/packages/bmwcarit/silex-jira-oauth-provider)[ Docs](http://bmwcarit.github.io/silex-jira-oauth-provider/)[ RSS](/packages/bmwcarit-silex-jira-oauth-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (1)

Silex JIRA OAuth Provider
=========================

[](#silex-jira-oauth-provider)

The Silex JIRA OAuth Provider provides a simple mechanism to enable your applicaton to use the \[Atlassian JIRA REST API\] () without the need of password transmission. Instead of using basic authentication an access token is created using JIRAs OAuth interface. This token can then be used with a [Guzzle HTTP Client](http://guzzle.readthedocs.org/en/latest/) to retrieve, modify and create issues in JIRA.

Prerequisites
-------------

[](#prerequisites)

In order for the provider to work, you need the following

- A running [Atlassian JIRA](https://www.atlassian.com/software/jira) server.
- An application link for a generic application with an incoming authorization configured (see the \[documentation\] () for more details).

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

[](#installation)

You can install the silex jira oauth provider through [Composer](https://getcomposer.org/)

```
composer require bmwcarit/silex-jira-oauth-provider "dev-master"

```

The provider currently uses the dev-master version of the [guzzlehttp/oauth-provider](https://github.com/guzzle/oauth-subscriber)as it contains a necessary bugfix. To be able to pull this version with composer you need to set the minimum stability of your project to "dev":

```
{
    "minimum-stability": "dev"
}

```

Usage
-----

[](#usage)

Before you can use the provider you need to configure and register it with your silex application. The following code shows the most common configuration options that are necessary:

```
$app->register(new JiraOAuthServiceProvider(array(
	'base_url' => 'https://www.yourcorp.com/jira/',
	'private_key' => __DIR__ . '/jira.pem',
	'consumer_key' => 'yoursecretkey',
)));

```

Once the provider is registered your application will have a new controller mounted at `/jira`. To start the authentication process simple open the route with the name `jira-connect`. Either you redirect within your code

```
$app->redirect($app['url_generator']->generate('jira-connect'));

```

or you add link to your twig templates.

```
Click here to authenticate with Jira

```

Once the authentication is successful the provider will redirect to the route with the name `home` or, if it does not exist, to `/` of your silex application.

You can alter this behavior by adding a redirect parameter containing the name of a route or an URL, to which the provider should redirect after successful authentication. For example:

```
$app->redirect($app['url_generator']->generate('jira-connect',
										array('redirect' => 'yourroute')));

```

Or in your twig template:

```

	Click here to authenticate with Jira

```

After successful authentication you can use the \[Atlassian JIRA REST API\] () with the available [Guzzle HTTP Client](http://guzzle.readthedocs.org/en/latest/). For example:

```
$app['jira.oauth.client']->get('rest/api/2/priority');

```

Configuration Options
---------------------

[](#configuration-options)

- **base\_url:**The base URL of your Atlassian JIRA server. (*default*: `http://localhost:8181/`)
- **oauth\_base\_url:**The path to the oauth plugin. Atlassian JIRA serves the OAuth APIs here by default. (*default*: `plugins/servlet/oauth/`)
- **private\_key:**The path to the private key file that authenticate your application with Atlassian JIRA. (*default*: `''`)
- **consumer\_key:**A string containing the consumer key that is used to authenticate your application with Atlassian JIRA. (*default*: `''`)
- **url\_prefix.request\_token:**The URL prefix to construct the URL to request a new token. This is constructed with the `base_url` and the `oauth_base_url`. The default of this option already matches JIRAs default. (*default*: `request-token`)
- **url\_prefix.authorization:**The URL prefix to construct the URL to authorize a token. This is constructed with the `base_url` and the `oauth_base_url`. The default of this option already matches JIRAs default. (*default*: `authorize?oauth_token=%s`)
- **url\_prefix.access\_token:**The URL prefix to construct the URL to request an access token. This is constructed with the `base_url` and the `oauth_base_url`. The default of this option already matches JIRAs default. (*default*: `access-token`)
- **route\_name.callback:**The name of the route which handles the callback from Atlassian JIRA. The callback is transmitted to JIRA and once the user allows the application to access JIRA he will be redirected to this URL. (*default*: `jira-callback`)
- **route\_name.default\_redirect:**The name of the route to redirect the user upon successful authentication. This route is only used if you do not set the redirect parameters on the `jira-connect` route. (*default*: `home`)
- **automount:**If this is set to true the provider will automatically mount the `jira-connect`and `jira-callback` routes under `/jira`. If you set this to false make sure you mount the controller yourself. To do this simply call `$app->mount('/yourpath', $app['jira.controller.provider']);`(*default*: `true`)

License
-------

[](#license)

The silex-jira-oauth-provider is licensed under the MIT license.

Acknowledgment
--------------

[](#acknowledgment)

The initial work is based on the \[JIRA OAuth PHP examples\] ([https://bitbucket.org/atlassian\_tutorial/atlassian-oauth-examples/src/d625161454d1ca97b4515c6147b093fac9a68f7e/php/LICENSE?at=default](https://bitbucket.org/atlassian_tutorial/atlassian-oauth-examples/src/d625161454d1ca97b4515c6147b093fac9a68f7e/php/LICENSE?at=default)) by Stan Lemon

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~239 days

Total

2

Last Release

3850d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce2a0eab109acd6400dac957811cc499987131497340ec8f87047c7b8716ccb9?d=identicon)[elmi82](/maintainers/elmi82)

![](https://www.gravatar.com/avatar/67f87bb3866c824ad7b7c225d5ab127070c148629f6a9f7d0a8e3aed66ff3c5c?d=identicon)[michaelknapp](/maintainers/michaelknapp)

---

Top Contributors

[![michaelknapp](https://avatars.githubusercontent.com/u/5584175?v=4)](https://github.com/michaelknapp "michaelknapp (2 commits)")

---

Tags

provideroauthjirasilex

### Embed Badge

![Health badge](/badges/bmwcarit-silex-jira-oauth-provider/health.svg)

```
[![Health](https://phpackages.com/badges/bmwcarit-silex-jira-oauth-provider/health.svg)](https://phpackages.com/packages/bmwcarit-silex-jira-oauth-provider)
```

###  Alternatives

[hwi/oauth-bundle

Support for authenticating users using both OAuth1.0a and OAuth2 in Symfony.

2.4k21.5M69](/packages/hwi-oauth-bundle)[overtrue/socialite

A collection of OAuth 2 packages.

1.4k5.5M87](/packages/overtrue-socialite)[socialiteproviders/apple

Apple OAuth2 Provider for Laravel Socialite

618.4M8](/packages/socialiteproviders-apple)[socialiteproviders/microsoft-azure

Microsoft Azure OAuth2 Provider for Laravel Socialite

556.0M19](/packages/socialiteproviders-microsoft-azure)[socialiteproviders/vkontakte

VKontakte OAuth2 Provider for Laravel Socialite

881.0M7](/packages/socialiteproviders-vkontakte)[socialiteproviders/microsoft

Microsoft OAuth2 Provider for Laravel Socialite

326.1M13](/packages/socialiteproviders-microsoft)

PHPackages © 2026

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