diff options
author | Andrew Manning <tamanning@zoho.com> | 2018-02-24 06:48:30 -0500 |
---|---|---|
committer | Andrew Manning <tamanning@zoho.com> | 2018-02-24 06:48:30 -0500 |
commit | 64ee42fc3d00765bc5c60e451b86230ea38ffdfb (patch) | |
tree | 17519229614dbc4887a6f3a8fd16ce306ac7bef9 /Zotlabs/Module/Oauth2testvehicle.php | |
parent | 70719c67d30810c8127707b0dd1fd7ed66aa4a9a (diff) | |
download | volse-hubzilla-64ee42fc3d00765bc5c60e451b86230ea38ffdfb.tar.gz volse-hubzilla-64ee42fc3d00765bc5c60e451b86230ea38ffdfb.tar.bz2 volse-hubzilla-64ee42fc3d00765bc5c60e451b86230ea38ffdfb.zip |
Add channel ID to user_id in clients table. Added TODO comments about dynamic client registration protocol.
Diffstat (limited to 'Zotlabs/Module/Oauth2testvehicle.php')
-rw-r--r-- | Zotlabs/Module/Oauth2testvehicle.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Zotlabs/Module/Oauth2testvehicle.php b/Zotlabs/Module/Oauth2testvehicle.php index 6e9f31c47..79958f025 100644 --- a/Zotlabs/Module/Oauth2testvehicle.php +++ b/Zotlabs/Module/Oauth2testvehicle.php @@ -8,6 +8,7 @@ class OAuth2TestVehicle extends \Zotlabs\Web\Controller { // If there is a 'code' and 'state' parameter then this is a client app // callback issued after the authorization code request + // TODO: Check state value and compare to original sent value if ($_REQUEST['code'] && $_REQUEST['state']) { logger('Authorization callback invoked.', LOGGER_DEBUG); logger(json_encode($_REQUEST, JSON_PRETTY_PRINT), LOGGER_DEBUG); @@ -61,8 +62,14 @@ class OAuth2TestVehicle extends \Zotlabs\Web\Controller { array( array('response_type', 'code'), array('client_id', urlencode('test_app_client_id')), - array('redirect_uri', urlencode('http://hub.localhost/oauth2testvehicle')), - array('state', 'xyz') + array('redirect_uri', 'http://hub.localhost/oauth2testvehicle'), + array('state', 'xyz'), + // OpenID Connect Dynamic Client Registration 1.0 Client Metadata + // http://openid.net/specs/openid-connect-registration-1_0.html + array('client_name', urlencode('Killer App')), + array('logo_uri', urlencode('https://client.example.com/website/img/icon.png')), + array('client_uri', urlencode('https://client.example.com/website')), + array('application_type', 'web'), // would be 'native' for mobile app ), 'oauth_authorize', 'Authorize a test client app', |