Skip to content

Commit

Permalink
Merge pull request #4 from samuelthomas2774/v3
Browse files Browse the repository at this point in the history
v3
  • Loading branch information
samuelthomas2774 authored Aug 28, 2019
2 parents 99c84fd + ebd5091 commit b098701
Show file tree
Hide file tree
Showing 128 changed files with 5,976 additions and 2,119 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

indent_style = space
indent_size = 4

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
3 changes: 1 addition & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014 Samuel Elliott
Copyright (c) 2014-2019 Samuel Elliott

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -19,4 +19,3 @@ 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.

511 changes: 196 additions & 315 deletions README.md

Large diffs are not rendered by default.

35 changes: 20 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{
"name": "samuelthomas2774/oauth-client",
"description": "An OAuth 2.0 Client library with built-in support for Facebook, Google, Microsoft, Yahoo, GitHub, LinkedIn & more.",
"keywords": [ "oauth", "client", "oauth-client", "oauth2", "oauth2-client" ],
"homepage": "https://samuelthomas2774.github.io/oauth-client/",
"license": "MIT",
"authors": [
{
"name": "Samuel Elliott",
"email": "[email protected]",
"homepage": "https://samuelthomas.ml"
}
],
"autoload": {
"files": [ "src/autoload.php" ]
}
"name": "samuelthomas2774/oauth-client",
"description": "An OAuth 2.0 Client library with built-in support for Facebook, Google, Microsoft, Yahoo, GitHub, LinkedIn & more.",
"keywords": ["oauth", "client", "oauth-client", "oauth2", "oauth2-client"],
"homepage": "https://samuelthomas2774.github.io/oauth-client/",
"license": "MIT",
"authors": [
{
"name": "Samuel Elliott",
"email": "[email protected]",
"homepage": "https://samuelelliott.ml"
}
],
"autoload": {
"psr-4": {
"OAuth2\\": "src/"
}
},
"require": {
"guzzlehttp/guzzle": "~6.0"
}
}
249 changes: 249 additions & 0 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
client.php

!all-2/client.php
all-2/clients.php
22 changes: 22 additions & 0 deletions examples/all-2/client.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

$clients = require __DIR__ . '/clients.php';

if (!isset($_SERVER['PATH_INFO'])) {
echo 'No server.<br />';

foreach ($clients as $url => $client) {
echo '<a href="' . $_SERVER['PHP_SELF'] . '/' . $url . '">' . $client['name'] . '</a><br />';
}

return;
}

$url = ltrim($_SERVER['PATH_INFO'], '/');

if (!isset($clients[$url])) {
echo 'Unknown client "' . htmlentities($client_url) . '".<br />';
return;
}

return $clients[$url];
22 changes: 22 additions & 0 deletions examples/all-2/clients-example.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

/**
* Copy this to clients.php and add your client IDs and secrets.
*/

return [
'speechmore' => [
'name' => 'SpeechMore',
'class' => \OAuth2\Providers\SpeechMore\SpeechMore::class,
'id' => '...',
'secret' => '...',
'redirect_url' => 'https://' . $_SERVER['HTTP_HOST'] . '/oauth-client/examples/all-2/code.php/speechmore',
'scope' => [
'user:name',
'user:avatar',
],
'options' => [
'session_prefix' => 'speechmore_',
],
],
];
Loading

0 comments on commit b098701

Please sign in to comment.