Permalink
Browse files

[oauth] add SensiolabsConnector

[oauth] add Twitter

closes #55
closes #56
  • Loading branch information...
inmarelibero committed Dec 6, 2013
1 parent d1d4487 commit 4a439b4c6c1678b21f125257cee25473a051a7af
View
@@ -13,6 +13,7 @@ hwi_oauth:
# these properties will be used/redefined later in the custom FOSUBUserProvider service.
github: githubId
twitter: twitterId
sensiolabsconnect: sensiolabsconnectIds
resource_owners:
github:
@@ -24,4 +25,9 @@ hwi_oauth:
type: twitter
client_id: %oauth_twitter_client_id%
client_secret: %oauth_twitter_client_secret%
#scope: "user:email"
#scope: "user:email"
sensiolabsconnect:
type: sensio_connect
client_id: %oauth_sensiolabsconnect_client_id%
client_secret: %oauth_sensiolabsconnect_client_secret%
scope: "SCOPE_EMAIL"
@@ -20,7 +20,9 @@ parameters:
mail_address: -
# oauth apps parameters
oauth_github_client_id: xxxxx
oauth_github_client_secret: xxxxx
oauth_twitter_client_id: xxxxx
oauth_twitter_client_secret: xxxxx
oauth_github_client_id: xxxxx
oauth_github_client_secret: xxxxx
oauth_twitter_client_id: xxxxx
oauth_twitter_client_secret: xxxxx
oauth_sensiolabsconnect_client_id: xxxxx
oauth_sensiolabsconnect_client_secret: xxxxx
View
@@ -130,6 +130,8 @@ github_login:
pattern: /login/check-github
twitter_login:
pattern: /login/check-twitter
sensiolabsconnect_login:
pattern: /login/check-sensiolabsconnect
# AvalancheImagineBundle
_imagine:
View
@@ -18,8 +18,9 @@ security:
oauth:
resource_owners:
github: "/login/check-github"
twitter: "/login/check-twitter"
github: "/login/check-github"
twitter: "/login/check-twitter"
sensiolabsconnect: "/login/check-sensiolabsconnect"
login_path: /login
failure_path: /login
@@ -30,32 +30,44 @@ class User extends BaseUser implements ParticipantInterface
* @ORM\Column(name="github_id", type="string", length=255, nullable=true)
* @var string
*/
private $githubId;
protected $githubId;
/**
* @ORM\Column(name="github_access_token", type="string", length=255, nullable=true)
* @var string
*/
private $githubAccessToken;
protected $githubAccessToken;
/**
* @ORM\Column(name="twitter_id", type="string", length=255, nullable=true)
* @var string
*/
private $twitterId;
protected $twitterId;
/**
* @ORM\Column(name="twitter_access_token", type="string", length=255, nullable=true)
* @var string
*/
private $twitterAccessToken;
protected $twitterAccessToken;
/**
* @ORM\Column(name="sensiolabsconnect_id", type="string", length=255, nullable=true)
* @var string
*/
protected $sensiolabsconnectId;
/**
* @ORM\Column(name="sensiolabsconnect_access_token", type="string", length=255, nullable=true)
* @var string
*/
protected $sensiolabsconnectAccessToken;
/**
* @var boolean $emailpolicy_send_on_new_message
*
* @ORM\Column(type="boolean", nullable=true)
*/
private $emailpolicy_send_on_new_message = true;
protected $emailpolicy_send_on_new_message = true;
/**
* @Assert\File(
@@ -81,26 +93,26 @@ class User extends BaseUser implements ParticipantInterface
* @Gedmo\Timestampable(on="create")
* @ORM\Column(type="datetime")
*/
private $created_at;
protected $created_at;
/**
* @var datetime $updated_at
*
* @Gedmo\Timestampable(on="update")
* @ORM\Column(type="datetime")
*/
private $updated_at;
protected $updated_at;
/**
* @ORM\OneToMany(targetEntity="Bricks\SiteBundle\Entity\Brick", mappedBy="user", cascade={"persist"})
* @ORM\OrderBy({"created_at" = "ASC"})
*/
private $bricks;
protected $bricks;
/**
* @ORM\OneToMany(targetEntity="Bricks\SiteBundle\Entity\UserStarsBrick", mappedBy="user", cascade={"persist"})
*/
private $userStarsBricks;
protected $userStarsBricks;
/**************************************************************************************************
* custom functions
@@ -219,6 +231,98 @@ public function getGithubAccessToken()
return $this->githubAccessToken;
}
/**
* Set twitterId
*
* @param string $twitterId
* @return User
*/
public function setTwitterId($twitterId)
{
$this->twitterId = $twitterId;
return $this;
}
/**
* Get twitterId
*
* @return string
*/
public function getTwitterId()
{
return $this->twitterId;
}
/**
* Set twitterAccessToken
*
* @param string $twitterAccessToken
* @return User
*/
public function setTwitterAccessToken($twitterAccessToken)
{
$this->twitterAccessToken = $twitterAccessToken;
return $this;
}
/**
* Get twitterAccessToken
*
* @return string
*/
public function getTwitterAccessToken()
{
return $this->twitterAccessToken;
}
/**
* Set sensiolabsconnectId
*
* @param string $sensiolabsconnectId
* @return User
*/
public function setSensiolabsconnectId($sensiolabsconnectId)
{
$this->sensiolabsconnectId = $sensiolabsconnectId;
return $this;
}
/**
* Get sensiolabsconnectId
*
* @return string
*/
public function getSensiolabsconnectId()
{
return $this->sensiolabsconnectId;
}
/**
* Set sensiolabsconnectAccessToken
*
* @param string $sensiolabsconnectAccessToken
* @return User
*/
public function setSensiolabsconnectAccessToken($sensiolabsconnectAccessToken)
{
$this->sensiolabsconnectAccessToken = $sensiolabsconnectAccessToken;
return $this;
}
/**
* Get sensiolabsconnectAccessToken
*
* @return string
*/
public function getSensiolabsconnectAccessToken()
{
return $this->sensiolabsconnectAccessToken;
}
/**
* Set emailpolicy_send_on_new_message
*
@@ -376,50 +480,4 @@ public function getUserStarsBricks()
{
return $this->userStarsBricks;
}
/**
* Set twitterId
*
* @param string $twitterId
* @return User
*/
public function setTwitterId($twitterId)
{
$this->twitterId = $twitterId;
return $this;
}
/**
* Get twitterId
*
* @return string
*/
public function getTwitterId()
{
return $this->twitterId;
}
/**
* Set twitterAccessToken
*
* @param string $twitterAccessToken
* @return User
*/
public function setTwitterAccessToken($twitterAccessToken)
{
$this->twitterAccessToken = $twitterAccessToken;
return $this;
}
/**
* Get twitterAccessToken
*
* @return string
*/
public function getTwitterAccessToken()
{
return $this->twitterAccessToken;
}
}
Oops, something went wrong.

0 comments on commit 4a439b4

Please sign in to comment.