Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 7, 2024 via composer

league/oauth2-server 8.5.4

A lightweight and powerful OAuth 2.0 authorization and resource server library with support for all the core specification grants. This library will allow you to secure your API with OAuth and allow your applications users to approve apps that want to access their data from your API.
Package summary
Share
0
issues
2
licenses
9
MIT
1
BSD-3-Clause
Package created
11 Jul 2012
Version published
25 Aug 2023
Maintainers
3
Total deps
10
Direct deps
5
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
9 Packages, Including:
defuse/php-encryption@v2.4.0
lcobucci/clock@3.2.0
league/event@2.2.0
league/oauth2-server@8.5.4
league/uri@7.4.1
league/uri-interfaces@7.4.1
paragonie/random_compat@v9.99.100
psr/clock@1.0.0
psr/http-factory@1.0.2

BSD 3-Clause "New" or "Revised" License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
place-warranty
Cannot
use-trademark
hold-liable
Must
include-copyright
include-license
1 Packages, Including:
lcobucci/jwt@5.3.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

5
All Dependencies CSV
β“˜ This is a list of league/oauth2-server 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
defuse/php-encryptionv2.4.056.68 kBMIT
prod
lcobucci/clock3.2.02.92 kBMIT
prod dev
lcobucci/jwt5.3.0-BSD-3-Clause
prod
league/event2.2.0-MIT
prod
league/uri7.4.1-MIT
prod

Visualizations

Frequently Asked Questions

What does league/oauth2-server do?

The league/oauth2-server is a powerful library written in PHP that is designed to provide a lightweight and standards-compliant implementation of an OAuth 2.0 authorization server. The primary purpose is to make the process of working with OAuth 2.0 extremely straightforward. You can easily configure an OAuth 2.0 server to protect your API with access tokens, or let apps request and refresh access tokens. It supports all core specification grants, including authorization code grant, implicit grant, client credentials grant, resource owner password credentials grant, and refresh grant.

How do you use league/oauth2-server?

To get started using the league/oauth2-server package, you must first install it using composer. You can do this by running the command composer require league/oauth2-server in your terminal or command prompt. Once installed, you can start using the library to build a secure OAuth 2.0 server to protect your API and manage access tokens. Please note that it requires PHP 8.0 or newer, and the openssl and json PHP extensions should also be installed. In addition, HTTP messages transferred to your server should accord with the PSR-7 standard to ensure compatibility with other packages and frameworks.

// An illustration of how to use the library (not actual working code)
require 'vendor/autoload.php';

use League\OAuth2\Server\AuthorizationServer;

// Instantiate the server
$server = new AuthorizationServer(
    $clientRepository, // an instance of ClientRepositoryInterface
    $accessTokenRepository, // an instance of AccessTokenRepositoryInterface
    $scopeRepository, // an instance of ScopeRepositoryInterface
    $privateKey, // Path to your private key file
    $publicKey // Path to your public key file
);

The actual usage and configuration would depend on the type of grant you want to implement, so you need to refer to the official library documentation for detailed instructions.

Where are the league/oauth2-server docs?

The official documentation of league/oauth2-server can be found at https://oauth2.thephpleague.com. The documentation provides comprehensive information on how to configure and implement various features of the OAuth 2.0 server in your PHP projects. You are welcome to contribute to the improving the documentation, which is maintained in the gh-pages branch on the GitHub repository. Have in mind that any issues or requests concerning OAuth should be raised via the GitHub issues tracker and not by email.