Skip to content

Commit b2e34ef

Browse files
fix url handling
1 parent 9c64f5c commit b2e34ef

File tree

10 files changed

+132
-160
lines changed

10 files changed

+132
-160
lines changed

.idea/codeception.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 33 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpspec.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpunit.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/tokens-validation.iml

Lines changed: 47 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"illuminate/database": "^9.52",
2020
"illuminate/events": "^9.52",
2121
"illuminate/container": "^9.52",
22-
"jwage/purl": "^0.0.9",
2322
"defuse/php-encryption": "^2.3",
2423
"illuminate/http": "^9.52"
2524
},

composer.lock

Lines changed: 1 addition & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.php

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,17 @@
88
TokensValidation::setFeatures([
99
'AuthTokens',
1010
'ConfirmationToken',
11-
'InvitationsTokens'
1211
]);
1312

1413
TokensValidation::setInvitationTokenExpirationDelay(60*60*24);
1514
TokensValidation::$InvitationBaseUrl = "http://localhost/invitations";
16-
TokensValidation::$InvitationTokenGenerator = MyInvitationTokenGenerator::class;
17-
TokensValidation::$InvitationUrlBuilder = MyInvitationUrlBuilder::class;
15+
/*TokensValidation::$InvitationTokenGenerator = MyInvitationTokenGenerator::class;
16+
TokensValidation::$InvitationUrlBuilder = MyInvitationUrlBuilder::class;*/
1817

1918
TokensValidation::prepare();
2019

21-
echo "<pre>";
22-
/*print_r(TokensValidation::$config);
20+
/*echo "<pre>";
21+
print_r(TokensValidation::$config);
2322
die();*/
2423
/*try {
2524
$inv = TokensValidation::createInvitation(
@@ -37,10 +36,9 @@
3736
$inv->getUrl(),
3837
$inv
3938
]);*/
40-
41-
try {
39+
/*try {
4240
$inv = TokensValidation::checkInvitationUrl(
43-
url: "http://localhost/invitations?c=TQrI32ZN7f7gKF7yPtmT8mQLp",
41+
url: "http://localhost/invitations?c=e6dXr7kg5aPO4Olz5RlpXHiww",
4442
whatFor: "administration",
4543
);
4644
@@ -51,30 +49,24 @@
5149
}
5250
print_r([
5351
$inv
54-
]);
52+
]);*/
5553

5654
//verify the data entered by the user.
5755

5856

59-
$invitation = TokensValidation::checkInvitationToken(
57+
/*$invitation = TokensValidation::checkInvitationToken(
6058
token: $_GET['token'],
6159
whatFor: "administration",
6260
thenAccept: true
6361
);
6462
6563
if (!$invitation->isValidationSucceed()) {
6664
die("INVITATION_INVALID");
67-
}
65+
}*/
6866

6967
//insert the data entered by the user.
7068
//performe some actions
7169
echo "invitation accepted";
7270

73-
?>
71+
die();
7472

75-
<form method="post" action="">
76-
<input type="text" name="fname">
77-
<input type="text" name="lname">
78-
<input type="email" name="email" readonly value="<?php echo $invitation->getTargetEmail() ?>">
79-
<button>submit</button>
80-
</form>

0 commit comments

Comments
 (0)