mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	Добавлен client_credentials grant для oAuth Рефакторинг структуры OauthScopes чтобы можно было разделить владельца прав на пользовательские и общие (машинные) Исправлена стилистика кода, внедряются фишки PHP 7.1
		
			
				
	
	
		
			21 lines
		
	
	
		
			531 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			531 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace api\components\OAuth2\Grants;
 | |
| 
 | |
| use api\components\OAuth2\Entities;
 | |
| 
 | |
| class ClientCredentialsGrant extends \League\OAuth2\Server\Grant\ClientCredentialsGrant {
 | |
| 
 | |
|     protected function createAccessTokenEntity() {
 | |
|         return new Entities\AccessTokenEntity($this->server);
 | |
|     }
 | |
| 
 | |
|     protected function createRefreshTokenEntity() {
 | |
|         return new Entities\RefreshTokenEntity($this->server);
 | |
|     }
 | |
| 
 | |
|     protected function createSessionEntity() {
 | |
|         return new Entities\SessionEntity($this->server);
 | |
|     }
 | |
| 
 | |
| }
 |