PHP_SMART_HOME_V3/app/views/Oauth.php

29 lines
855 B
PHP
Raw Permalink Normal View History

2020-05-16 23:27:06 +00:00
<?php
class Oauth extends Template
{
function __construct()
{
2020-09-14 14:24:59 +00:00
$userManager = new UserManager ();
2020-07-23 13:16:44 +00:00
$langMng = new LanguageManager('en');
2020-05-16 23:27:06 +00:00
$template = new Template('oauth');
$template->prepare('baseDir', BASEDIR);
2020-12-09 11:19:19 +00:00
$template->prepare('baseUrl', BASEURL);
2020-05-17 12:24:56 +00:00
$template->prepare('title', 'Simple Home - Oauth');
2020-05-16 23:27:06 +00:00
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();
}
}