-
Notifications
You must be signed in to change notification settings - Fork 167
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 #146 from filsh/refactor
- feat: added MacOS ignores - feat: added Docker configs for development env - fix: updated composer.json - feat: added YiiRequestAdapter for Yii2 >= 2.0.13
- Loading branch information
Showing
29 changed files
with
115 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM vardan/ubuntu:php-7.2 | ||
|
||
ENV PHP_DOCUMENT_ROOT /app | ||
|
||
ENV WORK_DIR ${PHP_DOCUMENT_ROOT} | ||
|
||
WORKDIR ${WORK_DIR} |
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 |
---|---|---|
|
@@ -13,21 +13,25 @@ | |
{ | ||
"name": "Igor Maliy", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Vardan Pogosian", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"yiisoft/yii2": "*", | ||
"bshaffer/oauth2-server-php": "~1.7" | ||
"bshaffer/oauth2-server-php": "^1.7" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"filsh\\yii2\\oauth2server\\": "" | ||
"filsh\\yii2\\oauth2server\\": "src/" | ||
} | ||
}, | ||
"extra": { | ||
"bootstrap": "filsh\\yii2\\oauth2server\\Bootstrap", | ||
"branch-alias": { | ||
"dev-master": "1.0.x-dev" | ||
"dev-master": "2.1.x-dev" | ||
} | ||
} | ||
} |
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,12 @@ | ||
version: "3" | ||
services: | ||
php: | ||
image: filsh/yii2-oauth2-server | ||
build: | ||
dockerfile: Dockerfile.dev | ||
context: . | ||
volumes: | ||
- ".:/app" | ||
|
||
networks: | ||
default: |
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,42 @@ | ||
<?php | ||
|
||
|
||
namespace filsh\yii2\oauth2server; | ||
|
||
|
||
use OAuth2\RequestInterface; | ||
|
||
class YiiRequestAdapter implements RequestInterface | ||
{ | ||
private $request; | ||
|
||
public function __construct(\yii\web\Request $request) | ||
{ | ||
$this->request = $request; | ||
} | ||
|
||
public function query($name, $default = null) | ||
{ | ||
return $this->request->get($name, $default); | ||
} | ||
|
||
public function request($name, $default = null) | ||
{ | ||
return $this->request->post($name, $default); | ||
} | ||
|
||
public function server($name, $default = null) | ||
{ | ||
return isset($_SERVER[$name]) ? $_SERVER[$name] : $default; | ||
} | ||
|
||
public function headers($name, $default = null) | ||
{ | ||
return $this->request->headers->get($name, $default); | ||
} | ||
|
||
public function getAllQueryParameters() | ||
{ | ||
return $this->request->queryParams; | ||
} | ||
} |
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
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
File renamed without changes.
File renamed without changes.