소스 검색

Return access tokens' scopes, not hardcoded list

Emelia Smith 1 년 전
부모
커밋
7b0a6060b2
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      app/Auth/BearerTokenResponse.php

+ 2 - 2
app/Auth/BearerTokenResponse.php

@@ -18,8 +18,8 @@ class BearerTokenResponse extends \League\OAuth2\Server\ResponseTypes\BearerToke
     protected function getExtraParams(AccessTokenEntityInterface $accessToken)
     {
         return [
-        	'created_at' => time(),
-        	'scope' => 'read write follow push'
+            'created_at' => time(),
+            'scope' => implode(' ', $accessToken->getScopes())
         ];
     }
 }