Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Commit 04e6cbb

Browse files
committed
cleanup the repository and migrate to code-lts
1 parent 4b4341a commit 04e6cbb

19 files changed

+34
-200
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea
22
*.iml
3-
/vendor
3+
.vscode
4+
/vendor
5+
composer.lock

LICENSE

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
BSD 2-Clause License
22

3-
Copyright (c) 2016, Samyoul
3+
Copyright (c) 2016-2016, Samyoul
4+
Copyright (c) 2021, William Desportes
45
All rights reserved.
56

67
Redistribution and use in source and binary forms, with or without

PDO-Without-AJAX/authenticate.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 18:11
7-
*/
2+
83
require("../vendor/autoload.php");
94
require("functions.php");
105

11-
use Samyoul\U2F\U2FServer\U2FServer as U2F;
6+
use CodeLts\U2F\U2FServer\U2FServer as U2F;
127
session_start();
138

149
// Authenticate user

PDO-Without-AJAX/dashboard.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 18:31
7-
*/
2+
83
require("../vendor/autoload.php");
94
require("functions.php");
105

PDO-Without-AJAX/database/migrations.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 16:43
7-
*/
2+
83
require_once('../functions.php');
94

105
$pdo = getDBConnection();

PDO-Without-AJAX/database/reset.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 14/12/2016
6-
* Time: 10:43
7-
*/
2+
83
require_once("../functions.php");
94

105
$pdo = getDBConnection();

PDO-Without-AJAX/database/seeds.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 16:57
7-
*/
2+
83
require_once("../functions.php");
94

105
$pdo = getDBConnection();
116

127
// Insert User seeds
138
$pdo->exec("
14-
INSERT INTO `users` VALUES (1,'samyoul');
9+
INSERT INTO `users` VALUES (1,'williamdes');
1510
INSERT INTO `users` VALUES (2,'donkey');
1611
INSERT INTO `users` VALUES (3,'shrek');
1712
");

PDO-Without-AJAX/functions.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 16:48
7-
*/
8-
use Samyoul\U2F\U2FServer\Registration;
2+
3+
use CodeLts\U2F\U2FServer\Registration;
94

105
/**
116
* @param string $location

PDO-Without-AJAX/index.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 17:16
7-
*/
2+
83
require("../vendor/autoload.php");
94

105
$templates = new League\Plates\Engine(__DIR__.'/views');

PDO-Without-AJAX/logout.php

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 23:51
7-
*/
2+
83
require("functions.php");
94

105
session_start();

PDO-Without-AJAX/test.php

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 12/12/2016
6-
* Time: 23:04
7-
*/
82

93
require('../vendor/autoload.php');
10-
use Samyoul\U2F\U2FServer\U2FServer as U2F;
4+
use CodeLts\U2F\U2FServer\U2FServer as U2F;
115

126
var_dump(U2F::checkOpenSSLVersion());

PDO-Without-AJAX/u2f-authentication-validation.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require("../vendor/autoload.php");
33
require("functions.php");
44

5-
use Samyoul\U2F\U2FServer\U2FServer as U2F;
5+
use CodeLts\U2F\U2FServer\U2FServer as U2F;
66
session_start();
77

88
$user = $_SESSION['authenticatingUser'];
-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 19:11
7-
*/
82

93
var_dump(json_decode($_POST['authentication_response']));

PDO-Without-AJAX/u2f-registration-validation.php

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 21:08
7-
*/
2+
83
require("../vendor/autoload.php");
94
require("functions.php");
105

11-
use Samyoul\U2F\U2FServer\U2FServer as U2F;
6+
use CodeLts\U2F\U2FServer\U2FServer as U2F;
127
session_start();
138

149
$user = $_SESSION['authenticatedUser'];

PDO-Without-AJAX/u2f-registration.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
<?php
2-
/**
3-
* Created by IntelliJ IDEA.
4-
* User: samuel
5-
* Date: 13/12/2016
6-
* Time: 18:11
7-
*/
2+
83
require("../vendor/autoload.php");
94
require("functions.php");
105

11-
use Samyoul\U2F\U2FServer\U2FServer as U2F;
6+
use CodeLts\U2F\U2FServer\U2FServer as U2F;
127
session_start();
138

149
$user = $_SESSION['authenticatedUser'];
@@ -23,7 +18,7 @@
2318
$_SESSION['registrationRequest'] = $registrationData['request'];
2419

2520
// Extract the request and signatures, JSON encode them so we can give the data to our javaScript magic
26-
/** @var \Samyoul\U2F\U2FServer\RegistrationRequest $registrationRequest */
21+
/** @var \CodeLts\U2F\U2FServer\RegistrationRequest $registrationRequest */
2722
$registrationRequest = json_encode($registrationData['request']);
2823
$registrationSignatures = json_encode($registrationData['signatures']);
2924

PDO-Without-AJAX/views/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="alert alert-info">
66
<p>Try logging in. Use one of the predefined users.</p>
77
<ul>
8-
<li>samyoul</li>
8+
<li>williamdes</li>
99
<li>donkey</li>
1010
<li>shrek</li>
1111
</ul>

README.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
# U2F-php-server-examples
2-
Examples for the U2F-php-server repository : https://github.com/Samyoul/U2F-php-server
2+
3+
Examples for the U2F-php-server repository : https://github.com/code-lts/U2F-php-server
34

45
## Installation
56

6-
```bash
7-
$ git clone https://github.com/Samyoul/U2F-php-server-examples.git
7+
```sh
8+
$ git clone https://github.com/code-lts/U2F-php-server-examples.git
89
$ cd u2f-php-server-examples
9-
$ composer install
10+
$ composer install
1011
```
1112

1213
## Getting Started
1314

14-
After you've installed the repository you will be able to start using the examples. They are written to "just work" , so hopefully they will.
15+
After you've installed the repository you will be able to start using the examples. They are written to "just work" , so hopefully they will.
1516

1617
Navigate to `https://your-development-ip-or-domain/u2f-php-server-examples/PDO-Without-AJAX/index.php`
1718

1819
Choose a one of the 3 preset users to login with, start playing! :D !
1920

2021
## Requirements
2122

22-
Presumably you've read the requirements of the source repository, but in case you haven't here's a link: https://github.com/Samyoul/U2F-php-server#requirements
23+
Presumably you've read the requirements of the source repository, but in case you haven't here's a link: https://github.com/code-lts/U2F-php-server#requirements
2324

2425
All the points are essential to pay attention to, but the biggest "gotcha" is that you are not using HTTPS.
2526

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "samyoul/u2f-php-server-examples",
3-
"description": "Working examples for samyoul/u2f-php-server repo",
2+
"name": "code-lts/u2f-php-server-examples",
3+
"description": "Working examples for code-lts/u2f-php-server repo",
44
"require": {
5-
"samyoul/u2f-php-server": "1.*",
5+
"code-lts/u2f-php-server": "^1",
66
"league/plates": "3.1"
77
},
88
"license": "BSD-2-Clause",

composer.lock

-108
This file was deleted.

0 commit comments

Comments
 (0)