mirror of
https://git.steelants.cz/SH/PHP_SMART_HOME_V3.git
synced 2026-10-11 17:54:34 +00:00
Proper Oauth for Google Home
This commit is contained in:
1 parent
1af11f3f58
commit
fef3c1e57f
15 files changed
+403
-421
No files matched your search
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
class Oauth extends Template
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
global $userManager;
|
||||
global $lang;
|
||||
|
||||
$template = new Template('oauth');
|
||||
$template->prepare('baseDir', BASEDIR);
|
||||
$template->prepare('title', 'Home');
|
||||
|
||||
$template->prepare('lang', $lang);
|
||||
|
||||
if (isset($_GET['redirect_uri'])) {
|
||||
$template->prepare('responseType', $_GET['response_type']);
|
||||
$template->prepare('redirectUrl', $_GET['redirect_uri']);
|
||||
$template->prepare('clientId', $_GET['client_id']);
|
||||
$template->prepare('state', $_GET['state']);
|
||||
} else {
|
||||
$template->prepare('responseType', $_POST['responseType']);
|
||||
$template->prepare('redirectUrl', $_POST['redirectUrl']);
|
||||
$template->prepare('clientId', $_POST['clientId']);
|
||||
$template->prepare('state', $_POST['state']);
|
||||
}
|
||||
|
||||
|
||||
$template->render();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user