Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9503ae6
Showing
18 changed files
with
4,579 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributing | ||
- Maintenance on this module is a shared effort of those who use it | ||
- To contribute improvements to the code, ensure you raise a pull request and discuss with the module maintainers | ||
- Please follow the SilverStripe [code contribution guidelines](https://docs.silverstripe.org/en/contributing/code/) and [Module Standard](https://docs.silverstripe.org/en/developer_guides/extending/modules/#module-standard) | ||
- Supply documentation that follows the [GitHub Flavored Markdown](https://help.github.com/articles/markdown-basics/) conventions | ||
- When having discussions about this module in issues or pull request please adhere to the [SilverStripe Community Code of Conduct](https://docs.silverstripe.org/en/contributing/code_of_conduct/) | ||
|
||
|
||
## Contributor license agreement | ||
By supplying code to this module in patches, tickets and pull requests, you agree to assign copyright | ||
of that code to Advanced Learning Ltd., on the condition that these code changes are released under the | ||
same MIT license as the original module. We ask for this so that the ownership in the license is clear | ||
and unambiguous. By releasing this code under a permissive license such as MIT, this copyright assignment | ||
won't prevent you from using the code in any way you see fit. |
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,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017 advanced-learning | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
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,29 @@ | ||
# SilverStripe Oauth2 Server | ||
|
||
[![Build Status](https://travis-ci.org/advanced-learning/silverstripe-oauth2-server.svg?branch=master)](https://travis-ci.org/advanced-learning/silverstripe-oauth2-server) | ||
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/advanced-learning/silverstripe-oauth2-server/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/advanced-learning/silverstripe-oauth2-server/?branch=master) | ||
[![codecov](https://codecov.io/gh/advanced-learning/silverstripe-oauth2-server/branch/master/graph/badge.svg)](https://codecov.io/gh/advanced-learning/silverstripe-oauth2-server) | ||
|
||
OAuth2 server for SilverStripe 4. | ||
|
||
## Requirements | ||
|
||
* `silverstripe/framework` ^4.0 | ||
* `league/oauth2-server` | ||
* `robbie/psr7-adapters` | ||
* `PHP >= 7.1` | ||
|
||
## Installation | ||
|
||
Install with [Composer](https://getcomposer.org): | ||
|
||
```shell | ||
composer require advanced-learning/silverstripe-oauth-server | ||
``` | ||
|
||
## Oauth Support | ||
|
||
Currently supports client and password grants. The client grant uses the endpoint '/oauth/authorizse'. | ||
Currently requires securing api endpoints manually. There is a middleware but this would affect all requests. | ||
The same logic could be used in conjunction with allowed_actions on the controller. | ||
|
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,4 @@ | ||
SilverStripe\GraphQL\Auth\Handler: | ||
authenticators: | ||
- class: Riddler7\Oauth2Graphql\Authenticator | ||
priority: 30 |
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 @@ | ||
{ | ||
"name": "riddler7/silverstripe-oauth2-graphql", | ||
"description": "SilverStripe module for adding graphql support to oauth2 server", | ||
"type": "silverstripe-vendormodule", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Conrad Dobbs", | ||
"email": "riddler400@gmail.com" | ||
} | ||
], | ||
"require": { | ||
"advanced-learning/silverstripe-oauth2-server": "dev-master", | ||
"silverstripe/framework": "^4.0", | ||
"silverstripe/vendor-plugin": "^1.0", | ||
"PHP": ">=7.1", | ||
"silverstripe/graphql": "^3.0" | ||
}, | ||
"repositories": [ | ||
{ | ||
"type": "vcs", | ||
"url": "https://github.com/riddler7/silverstripe-oauth2-server" | ||
} | ||
], | ||
"require-dev": { | ||
"phpunit/PHPUnit": "^5.7@stable", | ||
"silverstripe/sqlite3": "^2.1" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Riddler7\\Oauth2GraphQL\\": "src", | ||
"Riddler7\\Oauth2GraphQL\\Tests\\": "tests" | ||
} | ||
}, | ||
"minimum-stability": "dev", | ||
"prefer-stable": true | ||
} |
Oops, something went wrong.