2017 © Pedro Peláez
 

library zf-oauth2-doctrine-identity

Doctrine Enabled AuthenticatedIdentity

image

api-skeletons/zf-oauth2-doctrine-identity

Doctrine Enabled AuthenticatedIdentity

  • Tuesday, July 3, 2018
  • by tom_anderson
  • Repository
  • 2 Watchers
  • 3 Stars
  • 9,116 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 13 Versions
  • 21 % Grown

The README.md

OAuth2 Doctrine Identity

Build Status Gitter Patreon Total Downloads, (*1)

Versions

1.x for PHP 5.5 to 7.0. 2.x for PHP 7.1 onward., (*2)

About

By default zfcampus/zf-mvc-auth returns an ZF\MvcAuth\Identity\AuthenticatedIdentity when authenticated with a valid access token. This repository replaces that identity with a ZF\OAuth2\Doctrine\Identity\AuthenticatedIdentity., (*3)

ZF\OAuth2\Doctrine\Identity\AuthenticatedIdentity stores the api-skeletons/zf-oauth2-doctrine AccessToken Doctrine entity. The AuthentiatedIdentity has the functions getUser(), getAccessToken(), getClient() which return entities. With these your application can continue to work with ORM through the rest of the request lifecycle., (*4)

api-skeletons/zf-oauth2-doctrine supports multiple OAuth2 configurations and api-skeletons/zf-oauth2-doctrine-identity searches through each configuration to find the AccessToken entity based on the access_token and client_id supplied by ZF\MvcAuth\Identity\AuthenticatedIdentity., (*5)

Authorization

The zf-mvc-auth Authorization Service is injected into the AuthenticatedIdentity. You may fetch the Authorization Service with $identity->getAuthorizationService(). There is a convenience method for ACL $identity->isAuthorized($resource, $privilege)., (*6)

Installation

Installation of this module uses composer. For composer documentation, please refer to getcomposer.org., (*7)

composer require api-skeletons/zf-oauth2-doctrine-identity

This will be added to your application's list of modules:, (*8)

'modules' => array(
   ...
   'ZF\OAuth2\Doctrine\Identity',
),

The Versions