Example #1
0
                FlashMessage::add('Momentan nu putem accepta OpenID de la acest furnizor. Problema nu ține de noi, dar vom încerca să o reparăm.');
            }
        } else {
            // asume plain OpenID
            $isOpenidConnect = false;
        }
    }
    if (!FlashMessage::getMessage()) {
        if ($isOpenidConnect) {
            try {
                $oidc->authenticate($oidcId, $oidcSecret);
            } catch (OpenIDException $e) {
                FlashMessage::add($e->getMessage());
            }
        } else {
            $authResult = OpenID::beginAuth($openid, null);
            if ($authResult != null) {
                SmartyWrap::displayWithoutSkin('auth/beginAuth.ihtml');
                exit;
            }
        }
    }
}
if ($devel) {
    SmartyWrap::assign('allowFakeUsers', true);
    SmartyWrap::assign('privilegeNames', $PRIV_NAMES);
    SmartyWrap::assign('fakeUserNick', 'test' . rand(10000, 99999));
}
SmartyWrap::assign('openid', $openid);
SmartyWrap::assign('page_title', 'Autentificare cu OpenID');
SmartyWrap::assign('suggestHiddenSearchForm', true);
Example #2
0
<?php

require_once "../../phplib/util.php";
util_assertNotMirror();
util_assertNotLoggedIn();
$openid = util_getRequestParameter('openid');
switch ($openid) {
    case 'google':
        $openid = "https://www.google.com/accounts/o8/id";
        break;
    case 'yahoo':
        $openid = "http://yahoo.com/";
        break;
}
if ($openid) {
    OpenID::beginAuth($openid, null);
    smarty_displayWithoutSkin('common/auth/beginAuth.ihtml');
    exit;
}
smarty_assign('openid', $openid);
smarty_assign('page_title', 'Autentificare cu OpenID');
smarty_assign('suggestHiddenSearchForm', true);
smarty_displayCommonPageWithSkin('auth/login.ihtml');