From b08d2bb70ce7aa4fdfc577b45828232853a90753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 30 Jun 2016 13:47:18 +0200 Subject: [PATCH 1/5] Update README.md --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index c61d9ee..3869fb2 100644 --- a/README.md +++ b/README.md @@ -6,19 +6,28 @@ To use this general OAuth2 client-class, include it with ``` $client_id is client id of the OAuth2 application + $client_secret is client secret of the OAuth2 application + $redirect_uri is the specified redirect-uri for the OAuth2 application + $auth is the full url for authorization + $token is the full token url + $user is the full identity url (example: https://auth.dataporten.no/userinfo) Optional - $authorization_type defaults to Bearer + $session specifies whether the state is to be saved in _SESSION storage, defaults to false + $verify is whether to verify SSL of host and peer, defaults to false + $grant_type defaults to 'authorization_code' + $response_type defaults to 'code' From 20769085d4b54d44fc3e527e77be7b1060f14780 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 30 Jun 2016 13:49:00 +0200 Subject: [PATCH 2/5] Update README.md --- README.md | 32 +++++++++++--------------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 3869fb2..b47681c 100644 --- a/README.md +++ b/README.md @@ -5,31 +5,21 @@ To use this general OAuth2 client-class, include it with $oauth2 = new OAuth2( $client_id, $client_secret, $redirect_uri, $auth, $token, $user, $authorization_type, $session, $verify, $grant_type, $response_type); ``` -$client_id is client id of the OAuth2 application - -$client_secret is client secret of the OAuth2 application - -$redirect_uri is the specified redirect-uri for the OAuth2 application - -$auth is the full url for authorization - -$token is the full token url - -$user is the full identity url (example: https://auth.dataporten.no/userinfo) +```$client_id``` is client id of the OAuth2 application +```$client_secret``` is client secret of the OAuth2 application +```$redirect_uri``` is the specified redirect-uri for the OAuth2 application +```$auth``` is the full url for authorization +```$token``` is the full token url +```$user``` is the full identity url (example: https://auth.dataporten.no/userinfo) Optional - -$authorization_type defaults to Bearer - -$session specifies whether the state is to be saved in _SESSION storage, defaults to false - -$verify is whether to verify SSL of host and peer, defaults to false - -$grant_type defaults to 'authorization_code' - -$response_type defaults to 'code' - +```$authorization_type``` defaults to Bearer +```$session``` specifies whether the state is to be saved in _SESSION storage, defaults to false +```$verify``` is whether to verify SSL of host and peer, defaults to false +```$grant_type``` defaults to 'authorization_code' +```$response_type``` defaults to 'code' To start the redirect phase From d0eb094b3939c64ad9b722460bbf1559a13bcae2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 30 Jun 2016 13:51:03 +0200 Subject: [PATCH 3/5] Create LICENCE --- LICENCE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENCE diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..1dc38d5 --- /dev/null +++ b/LICENCE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Kasper Rynning-Tønnesen + +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. From 79b972b68e437865b6d0e768513754411dc2b43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 30 Jun 2016 15:06:39 +0200 Subject: [PATCH 4/5] Update README.md --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b47681c..b440bf7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,19 @@ # General OAuth2-Client To use this general OAuth2 client-class, include it with -``` require_once('OAuth2Client.php'); - $oauth2 = new OAuth2( $client_id, $client_secret, $redirect_uri, $auth, $token, $user, $authorization_type, $session, $verify, $grant_type, $response_type); +``` +require_once('OAuth2Client.php'); +$oauth2 = new OAuth2( + $client_id, + $client_secret, + $redirect_uri, + $auth, + $token, + $user, + $authorization_type, + $session, + $verify, + $grant_type, $response_type); ``` ```$client_id``` is client id of the OAuth2 application From 168d0660f9365e67df21f250c033321f353062a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kasper=20Rynning-T=C3=B8nnesen?= Date: Thu, 30 Jun 2016 15:06:48 +0200 Subject: [PATCH 5/5] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b440bf7..76cbfd4 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,8 @@ $oauth2 = new OAuth2( $authorization_type, $session, $verify, - $grant_type, $response_type); + $grant_type, + $response_type); ``` ```$client_id``` is client id of the OAuth2 application