library lava-oauth2
Lava OAuth2 Integration
krak/lava-oauth2
Lava OAuth2 Integration
- Thursday, May 4, 2017
- by ragboyjr
- Repository
- 1 Watchers
- 0 Stars
- 15 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 2 Open issues
- 2 Versions
- 0 % Grown
Lava OAuth2
This library provides OAuth2 integration with the Krak\Lava framework. It uses the league/oauth2-server
package for all of the heavy lifting and the Doctrine ORM for the backend., (*1)
Installation
Install with composer at krak/lava-oauth2
, (*2)
Usage
<?php
use Krak\LavaOAuth2;
$app->with(new LavaOAuth2\OAuth2Package());
$app['krak.lava_oauth2']['private_key'] = $app->basePath('oauth-private.key');
$app['krak.lava_oauth2']['public_key'] = $app->basePath('oauth-public.key');
$app['krak.lava_oauth2']['grants'] = [
'client_credentials' => true,
'access_token_ttl' => new \DateInterval('PT2H'),
];
$app->httpStack()->push($app['krak.lava_oauth2']['resource_server_middleware']);
$app->httpStack()->push(mount('/oauth', $app['krak.lava_oauth2']));
This configures the lava_oauth2 application and adds the oauth2 server and middleware onto the main application., (*3)
dev-master
9999999-dev
Lava OAuth2 Integration
Sources
Download
MIT
The Requires
The Development Requires
psr-7
oauth2
lava
v0.1.0
0.1.0.0
Lava OAuth2 Integration
Sources
Download
MIT
The Requires
The Development Requires
psr-7
oauth2
lava