コード例 #1
0
ファイル: login.php プロジェクト: adanek/myBlog
<?php

include_once '../app/services/AuthenticationService.php';
include_once '../app/services/HttpService.php';
#Start session
session_start();
// Check if post or get
$method = $_SERVER['REQUEST_METHOD'];
// POST - Save article
if ($method == "POST") {
    $user = isset($_POST['username']) ? $_POST['username'] : null;
    $password = isset($_POST['password']) ? $_POST['password'] : null;
    AuthenticationService::login($user, $password);
    // Redirect to articles
    HttpService::redirect_to('/articles/');
}
// GET - Show form
if ($method == "GET") {
    $show_error = false;
    if (isset($_GET) && isset($_GET['login'])) {
        $show_error = true;
    }
    $page_title = "Login";
    $page_content = '../app/views/login.php';
    include_once '../app/views/_layout.php';
}
コード例 #2
0
 /**
  * test bad role
  * @expectedException Amfphp_Core_Exception
  */
 public function testBadRole()
 {
     $this->serviceObj->login('user', 'userPassword');
     $this->object->filterServiceObject($this->serviceObj, 'AnyService', 'adminMethod');
 }
コード例 #3
0
ファイル: login.php プロジェクト: 32i/TheCalculator
<?php

include_once 'classDef.php';
include_once 'AuthenticationService.php';
$user = new authenticationType();
$user->username = '******';
$user->password = '******';
$user->client = 'tarifkalkulator';
$user->sessionId = session_id();
//$login = new AuthenticationService("./soap/wsdl/AuthenticationService.wsdl" , $options);
$login = new AuthenticationService("https://ecws.e-control.at/tkws/services/AuthenticationService?wsdl", $options);
//$login = new AuthenticationService();
$token = $login->login($user);
// echo "TOKEN: " . $token->authenticationToken . "<br/>\n";
// echo "-------------------------------<br/>\n";