Update PdAuthServiceProvider.php
This commit is contained in:
parent
656173e0aa
commit
03cb76c608
|
@ -57,7 +57,7 @@ class PdAuthServiceProvider extends ServiceProvider
|
|||
protected function setupRouter()
|
||||
{
|
||||
//添加获取token的路由
|
||||
$this->app['router']->get('auth/token.json', function (Request $request) {
|
||||
$this->app['router']->get('api/auth/token.json', function (Request $request) {
|
||||
$code = $request->input('pd_code');
|
||||
$id = $request->input('app_id');
|
||||
$token = app('pd.auth')->choose(null, $id)->getAccessToken($code);
|
||||
|
@ -69,7 +69,7 @@ class PdAuthServiceProvider extends ServiceProvider
|
|||
])->withCookie($cookie);
|
||||
});
|
||||
|
||||
$this->app['router']->get('auth/logout', function (Request $request) {
|
||||
$this->app['router']->get('api/auth/logout', function (Request $request) {
|
||||
app('pd.auth')->logout();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user