-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from bshaffer/develop
v0.3
- Loading branch information
Showing
30 changed files
with
515 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<?php | ||
|
||
namespace OAuth2\ServerBundle\Entity; | ||
|
||
/** | ||
* Client | ||
*/ | ||
class ClientPublicKey | ||
{ | ||
/** | ||
* @var \OAuth2\ServerBundle\Entity\Client | ||
*/ | ||
private $client; | ||
|
||
/** | ||
* @var integer | ||
*/ | ||
private $client_id; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
private $public_key; | ||
|
||
/** | ||
* Set client | ||
* | ||
* @param \OAuth2\ServerBundle\Entity\Client $client | ||
* @return ClientPublicKey | ||
*/ | ||
public function setClient(\OAuth2\ServerBundle\Entity\Client $client = null) | ||
{ | ||
$this->client = $client; | ||
|
||
// this is necessary as the client_id is the primary key | ||
$this->client_id = $client->getClientId(); | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Get client | ||
* | ||
* @return \OAuth2\ServerBundle\Entity\Client | ||
*/ | ||
public function getClient() | ||
{ | ||
return $this->client; | ||
} | ||
|
||
/** | ||
* Set public key | ||
* | ||
* @param string $public_key | ||
* @return Client | ||
*/ | ||
public function setPublicKey($public_key) | ||
{ | ||
$this->public_key = $public_key; | ||
|
||
return $this; | ||
} | ||
|
||
/** | ||
* Get public key | ||
* | ||
* @return string | ||
*/ | ||
public function getPublicKey() | ||
{ | ||
return $this->public_key; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace OAuth2\ServerBundle\Manager; | ||
|
||
use Doctrine\ORM\EntityManager; | ||
|
||
interface ScopeManagerInterface | ||
{ | ||
public function __construct(EntityManager $entityManager); | ||
|
||
/** | ||
* Creates a new scope | ||
* | ||
* @param string $scope | ||
* | ||
* @param string $description | ||
* | ||
* @return Scope | ||
*/ | ||
public function createScope($scope, $description = null); | ||
|
||
/** | ||
* Find a single scope by the scope | ||
* | ||
* @param $scope | ||
* @return Scope | ||
*/ | ||
public function findScopeByScope($scope); | ||
|
||
/** | ||
* Find all the scopes by an array of scopes | ||
* | ||
* @param array $scopes | ||
* @return mixed | ||
*/ | ||
public function findScopesByScopes(array $scopes); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
OAuth2\ServerBundle\Entity\ClientPublicKey: | ||
type: entity | ||
table: oauth_client_public_key | ||
id: | ||
client_id: | ||
type: string | ||
length: 50 | ||
fields: | ||
public_key: | ||
type: text | ||
oneToOne: | ||
client: | ||
targetEntity: OAuth2\ServerBundle\Entity\Client | ||
joinColumn: | ||
name: client_id | ||
referencedColumnName: client_id | ||
onDelete: CASCADE | ||
onUpdate: CASCADE | ||
lifecycleCallbacks: { } |
Oops, something went wrong.