Download the PHP package punktde/oauth2-server without Composer

On this page you can find all versions of the php package punktde/oauth2-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package oauth2-server

OAuth 2.0 Server for the Flow Framework

Travis Build Status Latest Stable Version Total Downloads

This Flow package provides an OAuth 2.0 server, based on The PHP League OAuth Server.

Setup

Installation

The installation is done with composer:

composer require punktde/oauth2-server

Run the doctrine migrations

./flow doctrine:migrate

Optional: Define position of routes

Routes are per default included without any position parameter. If routes are positioned wrong adjust the position accordig to the [Flow Route documentation](https://flowframework.readthedocs.io/en/stable/TheDefinitiveGuide/PartIII/Routing.html#subroutes-from-settings)

Configuration

Enable the required grant types within your settings:

PunktDe:
  OAuth2:
    Server:
      grantTypes:
        client_credentials:
          enabled: false
        authorization_code:
          enabled: false

Have a look at Settings.PunktDe.yaml for further configuration values.

Generate server keys:

./flow oauthserver:generateserverkeys

Create client credentials:

./flow oauthserver:createclientcredentials <identifier> <name> <grant-type>

Implemented Grants

There is a good listing at thephpleague.com of all grant types of OAuth2 which should help you to find the type that fits to your application.

The following OAuth 2.0 grant types are implemented:

Client credentials Grant

If you are authorizing a machine to access resources and you don’t require the permission of a user to access said resources you should implement the client credential grant.

Authorization code grant

If the client is a web application that has a server side component then you should implement the authorization code grant.

The urls to use are:

The Authorization code grant is currently implemented with an implicit authorization of the requesting application.

Authenticating users during authorization process

If /oauth/authorize is called without an authenticated Flow account, the user is automatically redirected to a configurable URL. After authentication, the user should be forwarded to /oauth/approveauthorization to approve the previously started authorization session.

Custom authorization request approval

Authentication request approval can be extended to fit your projects needs. You can put your custom logic into a class implementing the ApprovalStrategyInterface.


All versions of oauth2-server with dependencies

PHP Build Version
Package Version
Requires neos/flow Version ^7.0 || ^8.0
league/oauth2-server Version ^8.0
guzzlehttp/psr7 Version ^1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package punktde/oauth2-server contains the following files

Loading the files please wait ....