PHPackages                             mv-steven/heimdall - 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. mv-steven/heimdall

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

mv-steven/heimdall
==================

Painless OAuth 2.0 Server for CodeIgniter 4

v1.0.0(2y ago)05MITPHPPHP &gt;=7.2

Since May 31Pushed 2y agoCompare

[ Source](https://github.com/mv-steven/heimdall)[ Packagist](https://packagist.org/packages/mv-steven/heimdall)[ Docs](https://github.com/mv-steven/heimdall)[ Fund](https://ko-fi.com/ezralazuardy)[ Patreon](https://www.patreon.com/ezralazuardy)[ RSS](/packages/mv-steven-heimdall/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Heimdall OAuth2 Server for CodeIgniter 4
----------------------------------------

[](#heimdall-oauth2-server-for-codeigniter-4)

This is a fork of . That repo appears to have gone dead, and has some compatibility issues with php 8.1, so I'm trying to keep it current here.

I'll minimally try to keep this current with the latest PHP version, but as I have time, I'll be working on the following:

- Get the docs site up and running again
- Publish example DB migrations for Token/Client/Scope/etc. repositories that the core oauth2 server requires
- Controller examples for /token, /authorize, etc.
- There are dependencies from the Slim framework that were copied over, I'd like to replace them with equivalent classes that already exist in CI4.
- Maybe some improvements to make it easier to grab more detailed info about an authenticated user &amp; token

---

 [ ![Code Quality](https://camo.githubusercontent.com/1ce186bdf2f3e992a29fecd7c87a99c1af970db2bcde8e5c7aa85102083f1fa1/68747470733a2f2f696d672e736869656c64732e696f2f636f646163792f67726164652f6666333064316531636334393462316361303334363263643930663265316631) ](https://www.codacy.com/gh/mv-steven/heimdall/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mv-steven/heimdall&utm_campaign=Badge_Grade) [ ![Maintainability](https://camo.githubusercontent.com/bb70bacded6095f2538aa79bbdd9e9e177b653e3c5a3630ab6fd96dae632c649/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f6d762d73746576656e2f6865696d64616c6c) ](https://codeclimate.com/github/mv-steven/heimdall) [ ![Build](https://camo.githubusercontent.com/8e32d2d9d9d55c730c4c0f917801a0e5c774833e6c7496b8e097a6c7674b5212/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d762d73746576656e2f6865696d64616c6c2f4275696c643f6c6162656c3d6275696c64) ](https://github.com/mv-steven/heimdall/actions/workflows/build.yml) [ ![Codacy Security Scan](https://camo.githubusercontent.com/1030559eac380ebd776a5347cb0853a19e91857e1a2d93095cbea085045bbb7d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6d762d73746576656e2f6865696d64616c6c2f436f6461637925323053656375726974792532305363616e3f6c6162656c3d7365637572697479) ](https://github.com/mv-steven/heimdall/actions/workflows/codacy-analysis.yml) [ ![Releases](https://camo.githubusercontent.com/1935f372122060b253698860750fad98d7834fea51718026579bf3d19cee5dcf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d762d73746576656e2f6865696d64616c6c) ](https://github.com/mv-steven/heimdall/releases) [ ![Minimum PHP version](https://camo.githubusercontent.com/5a4b5bea4da44d3b47e8bce80d7a2f7decee0cd73647c8a991bad832dbd78126/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d762d73746576656e2f6865696d64616c6c) ](https://packagist.org/packages/mv-steven/heimdall) [ ![Issues](https://camo.githubusercontent.com/7bc5cf891c54267e99a53018fd7c87cfe1f0cf556480620931167a6f885d02e0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d762d73746576656e2f6865696d64616c6c3f636f6c6f723d726564) ](https://github.com/mv-steven/heimdall/issues) [ ![License](https://camo.githubusercontent.com/ee9165b22d59b0f391d7f3796a4f92314922ec09ed3aa5803c00b083ce02f67c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d762d73746576656e2f6865696d64616c6c)](https://github.com/mv-steven/heimdall/blob/master/LICENSE)

---

Inspired from the Norse mythology, [Heimdallr](https://en.wikipedia.org/wiki/Heimdallr), modernly anglicized as Heimdall is the gatekeeper of Bifröst, the rainbow road connecting Midgard, realm of the humans, to Asgard, the realm of Gods.

In **CodeIgniter 4**, Heimdall serves as the gatekeeper between the client and resource server. Heimdall gives you an out of the box OAuth 2 authorization protocol implementation to your CodeIgniter's Web Service. Heimdall also comes with some handy extensions such as [Open ID Connect](https://heimdall.ezralazuardy.com/documentation/oidc) support to gives you a simple identity layer on top of the OAuth 2 protocol and a [Proof Key for Code Exchange](https://heimdall.ezralazuardy.com/documentation/pkce) support.

Heimdall implements the standards compliant implementation of an [OAuth 2](https://tools.ietf.org/html/rfc6749) authorization server written in PHP which makes working with OAuth 2 trivial. You can easily configure an OAuth 2 server to protect your API with access tokens, or allow clients to request new access tokens and refresh them.

This library was created in order to simplify the need of OAuth 2 implementation in your CodeIgniter 4 framework, based on the [OAuth 2.0 Server](https://github.com/thephpleague/oauth2-server) library by [thephpleague](https://thephpleague.com/).

#### Latest version

[](#latest-version)

See the latest version of Heimdall [here](https://github.com/mv-steven/heimdall/releases).

✍️ Installation
---------------

[](#️-installation)

In order to install Heimdall, you have to use [Composer](https://getcomposer.org/).

In the root directory of your CodeIgniter 4 project, fire up a terminal and run:

```
composer require mv-steven/heimdall
```

Heimdall is now ready to be configured and run in your server.

🚀️ Getting Started
------------------

[](#️-getting-started)

In order to start configuring &amp; implementing Heimdall in your CodeIgniter 4 project, please refer to the [documentation](https://heimdall.ezralazuardy.com).

📖️ Documentation
----------------

[](#️-documentation)

Read the Heimdall documentation [here](https://heimdall.ezralazuardy.com).

👷️ Contributing
---------------

[](#️-contributing)

All contributions are welcomed. Please make a [pull request](https://github.com/mv-steven/heimdall/pulls) so that I can review your changes.

Before start making contributions to Heimdall, please read the [contribution guidelines](https://github.com/mv-steven/heimdall/blob/master/CONTRIBUTING.md) and [code of conduct](https://github.com/mv-steven/heimdall/blob/master/CODE_OF_CONDUCT.md).

🛡️ Security Policy
------------------

[](#️-security-policy)

Read the current Heimdall's security policy [here](https://github.com/mv-steven/heimdall/security/policy).

🗒️ Side Note
------------

[](#️-side-note)

Heimdall is at it's early stage. If you experiencing an error or bug, please report by creating a new [issues](https://github.com/mv-steven/heimdall/issues).

📜 License
---------

[](#-license)

[![](https://camo.githubusercontent.com/7093bcaad532768c3d8dc8a73d194858e0a81905476dab7201757091ec47fdf4/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466d762d73746576656e2532466865696d64616c6c2e7376673f747970653d6c61726765)](https://app.fossa.com/projects/git%2Bgithub.com%2Fmv-steven%2Fheimdall?ref=badge_large)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor2

2 contributors hold 50%+ of commits

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

1073d ago

### Community

---

Top Contributors

[![gitHusband](https://avatars.githubusercontent.com/u/23734057?v=4)](https://github.com/gitHusband "gitHusband (2 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![klAvAx](https://avatars.githubusercontent.com/u/600550?v=4)](https://github.com/klAvAx "klAvAx (1 commits)")[![mv-steven](https://avatars.githubusercontent.com/u/39963029?v=4)](https://github.com/mv-steven "mv-steven (1 commits)")

### Embed Badge

![Health badge](/badges/mv-steven-heimdall/health.svg)

```
[![Health](https://phpackages.com/badges/mv-steven-heimdall/health.svg)](https://phpackages.com/packages/mv-steven-heimdall)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M100](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M117](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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