Skip to content

Commit 1af11a8

Browse files
author
symfony-flex-server[bot]
authored
Merge pull request #1119
2 parents c2c5d43 + 0b9cd78 commit 1af11a8

File tree

7 files changed

+134
-0
lines changed

7 files changed

+134
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Read the documentation: https://github.com/FriendsOfSymfony/FOSOAuthServerBundle/blob/master/Resources/doc/index.md#step-5-configure-fosoauthserverbundle
2+
fos_oauth_server:
3+
db_driver: orm
4+
5+
client_class: App\Entity\Client
6+
access_token_class: App\Entity\AccessToken
7+
refresh_token_class: App\Entity\RefreshToken
8+
auth_code_class: App\Entity\AuthCode
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
fos_oauth_server_token:
2+
resource: "@FOSOAuthServerBundle/Resources/config/routing/token.xml"
3+
4+
fos_oauth_server_authorize:
5+
resource: "@FOSOAuthServerBundle/Resources/config/routing/authorize.xml"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"bundles": {
3+
"FOS\\OAuthServerBundle\\FOSOAuthServerBundle": ["all"]
4+
},
5+
"copy-from-recipe": {
6+
"config/": "%CONFIG_DIR%/",
7+
"src/": "%SRC_DIR%/"
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
use FOS\OAuthServerBundle\Entity\AccessToken as BaseAccessToken;
7+
8+
/**
9+
* @ORM\Entity
10+
*/
11+
class AccessToken extends BaseAccessToken
12+
{
13+
/**
14+
* @ORM\Id
15+
* @ORM\GeneratedValue
16+
* @ORM\Column(type="integer")
17+
*/
18+
protected $id;
19+
20+
/**
21+
* @ORM\ManyToOne(targetEntity="App\Entity\Client")
22+
* @ORM\JoinColumn(nullable=false)
23+
*/
24+
protected $client;
25+
26+
/**
27+
* @ORM\ManyToOne(targetEntity="App\Entity\User")
28+
* @ORM\JoinColumn(onDelete="CASCADE")
29+
*/
30+
protected $user;
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
use FOS\OAuthServerBundle\Entity\AuthCode as BaseAuthCode;
7+
8+
/**
9+
* @ORM\Entity
10+
*/
11+
class AuthCode extends BaseAuthCode
12+
{
13+
/**
14+
* @ORM\Id
15+
* @ORM\GeneratedValue
16+
* @ORM\Column(type="integer")
17+
*/
18+
protected $id;
19+
20+
/**
21+
* @ORM\ManyToOne(targetEntity="App\Entity\Client")
22+
* @ORM\JoinColumn(nullable=false)
23+
*/
24+
protected $client;
25+
26+
/**
27+
* @ORM\ManyToOne(targetEntity="App\Entity\User")
28+
* @ORM\JoinColumn(onDelete="CASCADE")
29+
*/
30+
protected $user;
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
use FOS\OAuthServerBundle\Entity\Client as BaseClient;
7+
8+
/**
9+
* @ORM\Entity
10+
*/
11+
class Client extends BaseClient
12+
{
13+
/**
14+
* @ORM\Id
15+
* @ORM\GeneratedValue
16+
* @ORM\Column(type="integer")
17+
*/
18+
protected $id;
19+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
namespace App\Entity;
4+
5+
use Doctrine\ORM\Mapping as ORM;
6+
use FOS\OAuthServerBundle\Entity\RefreshToken as BaseRefreshToken;
7+
8+
/**
9+
* @ORM\Entity
10+
*/
11+
class RefreshToken extends BaseRefreshToken
12+
{
13+
/**
14+
* @ORM\Id
15+
* @ORM\GeneratedValue
16+
* @ORM\Column(type="integer")
17+
*/
18+
protected $id;
19+
20+
/**
21+
* @ORM\ManyToOne(targetEntity="App\Entity\Client")
22+
* @ORM\JoinColumn(nullable=false)
23+
*/
24+
protected $client;
25+
26+
/**
27+
* @ORM\ManyToOne(targetEntity="App\Entity\User")
28+
* @ORM\JoinColumn(onDelete="CASCADE")
29+
*/
30+
protected $user;
31+
}

0 commit comments

Comments
 (0)