{"id":16674442,"url":"https://github.com/settermjd/zend-expressive-authentication","last_synced_at":"2025-10-08T05:58:33.615Z","repository":{"id":141498746,"uuid":"70674165","full_name":"settermjd/zend-expressive-authentication","owner":"settermjd","description":"This package provides HTML-based authentication middleware for Zend Expressive applications","archived":false,"fork":false,"pushed_at":"2016-11-30T09:01:07.000Z","size":89,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T22:14:04.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/settermjd.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-12T07:23:54.000Z","updated_at":"2017-05-30T21:34:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"0dd73b86-f25a-4854-a578-6e05783a54fa","html_url":"https://github.com/settermjd/zend-expressive-authentication","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fzend-expressive-authentication","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fzend-expressive-authentication/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fzend-expressive-authentication/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settermjd%2Fzend-expressive-authentication/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/settermjd","download_url":"https://codeload.github.com/settermjd/zend-expressive-authentication/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248104768,"owners_count":21048402,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T12:43:14.561Z","updated_at":"2025-10-08T05:58:28.576Z","avatar_url":"https://github.com/settermjd.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zend Expressive Authentication\n\nThis project provides PSR-7-compliant authentication middleware.\n\n## Why?\n\nThis repository serves two purposes. Firstly, it serves as a supporting code repository for my talk [Build Powerful and Flexible Micro-Applications, with Zend Expressive](https://goo.gl/5Bysd2). And secondly, it provides a simplified set of PSR-7-compliant authentication middleware for a Zend Expressive (or other PSR-7) application.\n\nIf you’re in one of the sessions where I give this talk, then feel free to use this repository to both follow along or go further than I do in the talk, building and expanding on the content taught. If you need an drop-in authentication library, then feel free to use it, ignoring the tutorial/talk aspect.\n\n## Installation\n\nTo install the code, depending on your needs, you can either clone the repository and browse through it, following along with the talk, by running:\n\n```\ngit clone git@github.com:settermjd/zend-expressive-authentication.git\n```\n\nAlternatively, to integrate it with a PSR-7 compliant application, make use of Composer via the following command:\n\n```\ncomposer require settermjd/zend-expressive-authentication\n```\n\nAs well as making the library available to your application as a core dependency, it will also copy the configuration files in place, assuming that you’re using it with Zend Expressive, and that your project directory structure follows the convention espoused by [the Zend Expressive Skeleton Installer](http://www.masterzendframework.com/zend-expressive-introduction/).\n\nCurrently, Zend Expressive is the only supported framework. Instructions for other PSR-7-compliant frameworks to follow.\n\n## Usage\n\nTo make use of the project, there’s not much that you need to do. All that you need to do is to stack the `AuthenticationMiddleware` as part of the middleware stack for one, several, or all routes within your application. Here are two examples.\n\n### Protecting a Single Route In An Application\n\n```php\n[\n    'name' =\u003e 'home',\n    'path' =\u003e '/',\n    'middleware' =\u003e\n        [\n            \\App\\Middleware\\AuthenticationMiddleware::class,\n            App\\Action\\HomePageAction::class,\n        ],\n    'allowed_methods' =\u003e ['GET'],\n],\n```\n\n### Protecting All Routes In An Application\n\n```php\n'routing' =\u003e [\n    'middleware' =\u003e [\n        ApplicationFactory::ROUTING_MIDDLEWARE,\n        \\App\\Middleware\\AuthenticationMiddleware::class,\n        ApplicationFactory::DISPATCH_MIDDLEWARE,\n    ],\n    'priority' =\u003e 1,\n],\n```\n\n## Contributing\n\nSee the [CONTRIBUTING](CONTRIBUTING.md) file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettermjd%2Fzend-expressive-authentication","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsettermjd%2Fzend-expressive-authentication","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettermjd%2Fzend-expressive-authentication/lists"}