PHPackages                             joomla/oauth1 - 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. [Framework](/categories/framework)
4. /
5. joomla/oauth1

ActiveJoomla-package[Framework](/categories/framework)

joomla/oauth1
=============

Joomla OAuth1 Package

4.0.1(9mo ago)3300.7k↓22.4%53GPL-2.0-or-laterPHPPHP ^8.3.0CI passing

Since Jun 4Pushed 9mo ago13 watchersCompare

[ Source](https://github.com/joomla-framework/oauth1)[ Packagist](https://packagist.org/packages/joomla/oauth1)[ Docs](https://github.com/joomla-framework/oauth1)[ RSS](/packages/joomla-oauth1/feed)WikiDiscussions 3.x-dev Synced 1mo ago

READMEChangelog (6)Dependencies (12)Versions (21)Used By (3)

The OAuth1 Package [![Build Status](https://github.com/joomla-framework/oauth1/actions/workflows/ci.yml/badge.svg?branch=3.x-dev)](https://github.com/joomla-framework/oauth1)
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#the-oauth1-package-)

[![Latest Stable Version](https://camo.githubusercontent.com/87a8901329b039ee86e579a0249b752578a8005577a841ebb0fa5d9d97324674/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6f61757468312f762f737461626c65)](https://packagist.org/packages/joomla/oauth1)[![Total Downloads](https://camo.githubusercontent.com/fbad90b61aa063199ded2c66a929410e903a300f15aa39deb5fd1e20393223fd/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6f61757468312f646f776e6c6f616473)](https://packagist.org/packages/joomla/oauth1)[![Latest Unstable Version](https://camo.githubusercontent.com/c05d3e952813dda36624fcb4f96864a0f811f68d403ede1880159f68bd3907d5/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6f61757468312f762f756e737461626c65)](https://packagist.org/packages/joomla/oauth1)[![License](https://camo.githubusercontent.com/b5c5b1218a13e4e58d1e887a1adcf32f09e6681ecc0b008b66f4c8a61fe13011/68747470733a2f2f706f7365722e707567782e6f72672f6a6f6f6d6c612f6f61757468312f6c6963656e7365)](https://packagist.org/packages/joomla/oauth1)

### Using the OAuth1 Package

[](#using-the-oauth1-package)

The OAuth1 package supports OAuth 1.0 and 1.0a protocol versions. The client facilitates authorised RESTful HTTP requests. You can find the OAuth RFC at .

The Client is abstract, it must be extended and have the two abstract methods implemented. These methods are verifyCredentials and validateResponse:

- verifyCredentials is used to check if an existing access token is still valid. Servers may have different ways of testing the access token validity, for example Twitter has a specific URL for this. There are several reasons an access token may be invalid: the token expires after some time, the user changes his password which invalidates the access token, the user de-authorizes your app, the user logs out.
- validateResponse method is used to check the response codes. This method abstract because servers may have different response error bodies.

By default the client will act as an OAuth 1.0a client. If you need an OAuth 1.0 client, than you have to set the constructor $version parameter to '1.0'. The client requires additional options and this can be done by injecting in a Registry object:

```
use Joomla\Oauth1\Client;
use Joomla\Registry\Registry;

$options = new Registry;
$options->set('consumer_key', $key);
$options->set('consumer_secret', $secret);
$options->set('callback', $my_url);
$options->set('accessTokenURL', $accessToken);
$options->set('authenticateURL', $authenticate);
$options->set('authoriseURL', $authorise);
$options->set('requestTokenURL', $requestToken);

// Call the Client constructor.
parent::__construct($this->options);
```

By default you have to set and send headers manually in your application, but if you want this to be done automatically by the client you can set Registry option 'sendheaders' to true.

```
$options->set('sendheaders', true);
```

Now you can authenticate the user and request him to authorise your application in order to get an access token, but if you already have an access token stored you can set it and if it's still valid your application will use it.

```
// Set the stored access token.
$oauth->setToken($token);

$access_token = $oauth->authenticate();
```

When calling the authenticate() method, your stored access token will be used only if it's valid, a new one will be created if you don't have an access token or if the stored one is not valid. The method will return a valid access token that's going to be used.

Now you can perform authorised requests using the oauthRequest method.

### A More Complete Example

[](#a-more-complete-example)

See the Twitter and LinkedIn packages for examples demonstrating more about the OAuth1 package.

TODO: add links to the Twitter and LinkedIn packages after this packages are merged.

### More Information

[](#more-information)

The following resources contain more information:

- \[[http://api.joomla.org/\](Joomla](http://api.joomla.org/](Joomla)! API Reference)
- \[[http://tools.ietf.org/html/rfc5849\](OAuth](http://tools.ietf.org/html/rfc5849](OAuth) RFC)

Installation via Composer
-------------------------

[](#installation-via-composer)

Add `"joomla/oauth1": "~3.0"` to the require block in your composer.json and then run `composer install`.

```
{
	"require": {
		"joomla/oauth1": "~3.0"
	}
}
```

Alternatively, you can simply run the following from the command line:

```
composer require joomla/oauth1 "~3.0"
```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance57

Moderate activity, may be stable

Popularity41

Moderate usage in the ecosystem

Community28

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 61.6% 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 ~277 days

Recently: every ~198 days

Total

17

Last Release

285d ago

Major Versions

1.1.2 → 2.0.0-beta2020-06-05

2.0.2 → 3.0.02023-10-08

3.0.1 → 4.0.02025-07-24

PHP version history (6 changes)1.0-alphaPHP &gt;=5.3.10

1.1.2PHP ^5.3.10|~7.0

2.0.0-betaPHP ^7.2.5

2.0.1PHP ^7.2.5|~8.0.0|~8.1.0

3.0.0PHP ^8.1.0

4.0.0PHP ^8.3.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/305a2164440014dcef9ac681c139fe5e8a1ce1d7a8c3b3cfb828497729a4c70e?d=identicon)[wilsonge](/maintainers/wilsonge)

---

Top Contributors

[![mbabker](https://avatars.githubusercontent.com/u/368545?v=4)](https://github.com/mbabker "mbabker (90 commits)")[![Hackwar](https://avatars.githubusercontent.com/u/313866?v=4)](https://github.com/Hackwar "Hackwar (20 commits)")[![dongilbert](https://avatars.githubusercontent.com/u/718028?v=4)](https://github.com/dongilbert "dongilbert (9 commits)")[![wilsonge](https://avatars.githubusercontent.com/u/1986000?v=4)](https://github.com/wilsonge "wilsonge (6 commits)")[![nibra](https://avatars.githubusercontent.com/u/827605?v=4)](https://github.com/nibra "nibra (4 commits)")[![dianaprajescu](https://avatars.githubusercontent.com/u/1551136?v=4)](https://github.com/dianaprajescu "dianaprajescu (3 commits)")[![diananeculai](https://avatars.githubusercontent.com/u/1551136?v=4)](https://github.com/diananeculai "diananeculai (3 commits)")[![heelc29](https://avatars.githubusercontent.com/u/66922325?v=4)](https://github.com/heelc29 "heelc29 (3 commits)")[![photodude](https://avatars.githubusercontent.com/u/10253980?v=4)](https://github.com/photodude "photodude (2 commits)")[![joomla-jenkins](https://avatars.githubusercontent.com/u/929228?v=4)](https://github.com/joomla-jenkins "joomla-jenkins (2 commits)")[![PhilETaylor](https://avatars.githubusercontent.com/u/400092?v=4)](https://github.com/PhilETaylor "PhilETaylor (1 commits)")[![eddieajau](https://avatars.githubusercontent.com/u/700871?v=4)](https://github.com/eddieajau "eddieajau (1 commits)")[![richard67](https://avatars.githubusercontent.com/u/7413183?v=4)](https://github.com/richard67 "richard67 (1 commits)")[![RobertDeutz](https://avatars.githubusercontent.com/u/43096773?v=4)](https://github.com/RobertDeutz "RobertDeutz (1 commits)")

---

Tags

joomlajoomla-frameworkoauth1phpframeworkoauth1joomla

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/joomla-oauth1/health.svg)

```
[![Health](https://phpackages.com/badges/joomla-oauth1/health.svg)](https://phpackages.com/packages/joomla-oauth1)
```

###  Alternatives

[joomla/oauth2

Joomla OAuth2 Package

10303.1k2](/packages/joomla-oauth2)[joomla/github

Joomla Github Package

2863.3k2](/packages/joomla-github)[joomla/application

Joomla Application Package

23404.8k11](/packages/joomla-application)[joomla/http

Joomla HTTP Package

17674.4k12](/packages/joomla-http)[joomla/filter

Joomla Filter Package

151.4M8](/packages/joomla-filter)[joomla/registry

Joomla Registry Package

16468.6k20](/packages/joomla-registry)

PHPackages © 2026

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