-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved some grant related functions into a trait to reduce duplicate code
- Loading branch information
1 parent
954ff19
commit 031cf30
Showing
7 changed files
with
55 additions
and
124 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 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,45 @@ | ||
<?php | ||
/** | ||
* OAuth 2.0 Client credentials grant | ||
* | ||
* @package php-loep/oauth2-server | ||
* @author Alex Bilbie <[email protected]> | ||
* @copyright Copyright (c) 2013 PHP League of Extraordinary Packages | ||
* @license http://mit-license.org/ | ||
* @link http://github.com/php-loep/oauth2-server | ||
*/ | ||
|
||
namespace League\OAuth2\Server\Grant; | ||
|
||
trait GrantTrait { | ||
|
||
/** | ||
* Return the identifier | ||
* @return string | ||
*/ | ||
public function getIdentifier() | ||
{ | ||
return $this->identifier; | ||
} | ||
|
||
/** | ||
* Return the response type | ||
* @return string | ||
*/ | ||
public function getResponseType() | ||
{ | ||
return $this->responseType; | ||
} | ||
|
||
/** | ||
* Override the default access token expire time | ||
* @param int $accessTokenTTL | ||
* @return self | ||
*/ | ||
public function setAccessTokenTTL($accessTokenTTL) | ||
{ | ||
$this->accessTokenTTL = $accessTokenTTL; | ||
return $this; | ||
} | ||
|
||
} |
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