PHP implementation of the Oz web authorization protocol
A PHP implementation of the 5.0.0 version of the Oz web authorization protocol.
- What is Oz?
- Getting Started
- Usage Examples
- Security Considerations
- Related Projects
According to the Oz README
Oz is a web authorization protocol based on industry best practices. Oz combines the Hawk authentication protocol with the Iron encryption protocol to provide a simple to use and secure solution for granting and authenticating third-party access to an API on behalf of a user or an application.
Oz is an alternative to OAuth 1.0a and OAuth 2.0 three-legged authorization. One of the goals of Oz is to be simple to use for the most common use cases without needing to be a web security expert while being flexible enough for less common use cases that may need more advanced web security knowledge. Oz does this by providing default options that are secure for the most common use cases, in other words Oz aims to be secure by default.
All of the official three-legged OAuth 2.0 workflows have an equivalent Oz workflow. Below is table showing the Oz workflow equivalents for the OAuth 2.0 workflows.
|OAuth 2.0 Workflow||Oz Workflow|
|Authorization Code||RSVP (The only offical workflow)|
|Implicit/PKCE||Implicit (Not an offical workflow)|
|Resource Owner Password Credentials||User Credentials (Not an offical workflow)|
- Git 2.9+
- PHP 7.2.0+
- OpenSSL PHP Extension
- JSON PHP Extension
- cURL PHP Extension (Only if using the Oz client)
- Node 6.9.0+ (Only for development)
Download and install using Composer:
composer require shawm11/oz-auth-php
This package includes two workflows that are not part of the official Oz web authorization protocol. These two new workflows are the User Credentials Workflow and the Implicit Workflow. The standard Oz workflow that is specifed by the official protocal is referred to as the "RSVP workflow".
- RSVP Workflow — Server
- User Credentials Workflow — Server
- Implicit Workflow — Server
- All Workflows — Server
- RSVP Workflow — Client
- User Credentials Workflow — Client
- Implicit Workflow — Client
- All Workflows — Client
- RSVP Workflow (Without Delegation) — General overview of the RSVP (standard) workflow when delegation is not being used
- User Credentials Workflow — General overview of the User Credentials workflow
- Implicit Workflow — General overview of the Implicit workflow
- Server API — API reference for the classes
- Client API — API reference for the classes
- Shared Arrays — Details about collections of data used in other parts of the API
See the Security Considerations section of Oz's README.
Hawk PHP Implementation — Hawk is an HTTP authentication scheme that is an alternative to OAuth 1.0a and OAuth 2.0 two-legged authentication.
Iron PHP Implementation — iron (spelled with all lowercase), a cryptographic utility for sealing a JSON object into an encapulated token. iron can be considered as an alternative to JSON Web Tokens (JWT).
Please read CONTRIBUTING.md for details on coding style, Git commit message guidelines, and other development information.
This project using SemVer for versioning. For the versions available, see the tags on this repository.
This project is open-sourced software licensed under the MIT license.