From 1aaf7ee895a77701be83d1e4c1c65019b0d3a70f Mon Sep 17 00:00:00 2001 From: wingzero Date: Fri, 6 Apr 2018 12:04:31 +0800 Subject: [PATCH] update ODM part of example: add user property in AccessToken, RefressToken, AuthCode. Missing it will cause mongodb not saving the referenced user, and in the authenication step, it will not able to get back user. Also replace the mapping with annotation for reading reasier. --- Resources/doc/index.md | 175 ++++++++++++++++++++++++----------------- 1 file changed, 104 insertions(+), 71 deletions(-) diff --git a/Resources/doc/index.md b/Resources/doc/index.md index 2f81abf2..34388068 100644 --- a/Resources/doc/index.md +++ b/Resources/doc/index.md @@ -282,47 +282,54 @@ You now can run the following command to create the model: ``` php - - - - - - - - -``` - ``` php client = $client; } + /** + * @param UserInterface $user + */ + public function setUser(UserInterface $user) + { + $this->user = $user; + } + /** + * @return UserInterface + */ + public function getUser() + { + return $this->user; + } } ``` -``` xml - - - - - - - - - - -``` - ``` php client = $client; } + /** + * @param UserInterface $user + */ + public function setUser(UserInterface $user) + { + $this->user = $user; + } + /** + * @return UserInterface + */ + public function getUser() + { + return $this->user; + } } ``` -``` xml - - - - - - - - - - -``` - ``` php client = $client; } + /** + * @param UserInterface $user + */ + public function setUser(UserInterface $user) + { + $this->user = $user; + } + /** + * @return UserInterface + */ + public function getUser() + { + return $this->user; + } } ``` -``` xml - - - - - - - - - - -``` - ### Step 4: Configure your application's security.yml In order for Symfony's security component to use the FOSOAuthServerBundle, you must