Download the PHP package api-skeletons/zf-oauth2-client without Composer
On this page you can find all versions of the php package api-skeletons/zf-oauth2-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download api-skeletons/zf-oauth2-client
More information about api-skeletons/zf-oauth2-client
Files in api-skeletons/zf-oauth2-client
Package zf-oauth2-client
Short Description An OAuth2 client for zfcampus/zf-oauth2
License BSD-3-Clause
Informations about the package zf-oauth2-client
ZF OAuth2 Client
When you write an application which includes zfcampus/zf-oauth2 this module is written to connect easily and cleanly connect to that zf-oauth2 implementation.
Install
Installation of this module uses composer. For composer documentation, please refer to getcomposer.org.
Add this module to your application's configuration:
This module provides the service manager config through the module but you may use the ZF\OAuth2\Client\OAuth2Client
class directly by injecting your own Zend\Http\Client
and configuration.
Configuration
Copy config/zf-oauth2-client.global.php.dist
to config/autoload/zf-oauth2-client-global.php
and edit.
You may configure multiple zf-oauth2 authorization code provider profiles. login_redirect_route is your
authentication route.
zf-oauth2 Server Configuration
zf-oauth2-client expects the server to return a new refresh token anytime a refresh token is used to get a new access token. To set this flag on zf-oauth2 use
Use
A controller is provided to send the user into the authorization code process and validate the code when the user returns. Upon validation the session will have a valid access_token.
To send a user into the authorization code process direct them to the zf-oauth2-client route.
When the user returns from the process they will be redirected to the login_redirect_route. This route should fetch an authorized http client and, using it, authenticate the user based on their profile returned from an API call back to the OAuth2 server.
Command Line Tools
To make JWT easier to test command line tools are included.
oauth2:jwt:generate
Generate a JWT to send to an OAuth2grant_type
ofurn:ietf:params:oauth:grant-type:jwt-bearer
All versions of zf-oauth2-client with dependencies
zendframework/zend-http Version ~2.5
zendframework/zend-uri Version ~2.5
zendframework/zend-servicemanager Version ~2.5
zendframework/zend-session Version ~2.5
zendframework/zend-mvc Version ~2.5
zendframework/zend-i18n Version ~2.5