mirror of
				https://github.com/elyby/accounts.git
				synced 2025-05-31 14:11:46 +05:30 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			612 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			612 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| namespace common\components\oauth\Entity;
 | |
| 
 | |
| use League\OAuth2\Server\Entity\EntityTrait;
 | |
| use League\OAuth2\Server\Entity\SessionEntity as OriginalSessionEntity;
 | |
| 
 | |
| class AccessTokenEntity extends \League\OAuth2\Server\Entity\AccessTokenEntity {
 | |
|     use EntityTrait;
 | |
| 
 | |
|     protected $sessionId;
 | |
| 
 | |
|     public function getSessionId() {
 | |
|         return $this->sessionId;
 | |
|     }
 | |
| 
 | |
|     /**
 | |
|      * @inheritdoc
 | |
|      * @return static
 | |
|      */
 | |
|     public function setSession(OriginalSessionEntity $session) {
 | |
|         parent::setSession($session);
 | |
|         $this->sessionId = $session->getId();
 | |
| 
 | |
|         return $this;
 | |
|     }
 | |
| 
 | |
| }
 |