Add recipe for FOSOAuthServerBundle

This commit is contained in:
MatTheCat
2021-04-12 15:00:33 +02:00
parent a8e030d0cb
commit 0b9cd78127
7 changed files with 134 additions and 0 deletions
@@ -0,0 +1,31 @@
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
/**
* @ORM\Entity
*/
class RefreshToken extends BaseRefreshToken
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
protected $id;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\Client")
* @ORM\JoinColumn(nullable=false)
*/
protected $client;
/**
* @ORM\ManyToOne(targetEntity="App\Entity\User")
* @ORM\JoinColumn(onDelete="CASCADE")
*/
protected $user;
}