Skip to content

Commit c9f0e3f

Browse files
committed
5124: Debugging
1 parent 625c745 commit c9f0e3f

2 files changed

Lines changed: 24 additions & 2 deletions

File tree

web/profiles/custom/os2loop/modules/os2loop_login_hack/os2loop_login_hack.routing.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
os2loop_login_hack.start:
2-
path: '/os2loop-login-hack/start'
2+
path: '/os2loop-cura-login/start'
33
defaults:
44
_title: 'Start login hack'
55
_controller: '\Drupal\os2loop_login_hack\Controller\Os2loopLoginHackController::start'
6-
methods: [POST]
6+
methods: [GET, POST]
77
requirements:
88
_role: 'anonymous'
99

@@ -15,3 +15,15 @@ os2loop_login_hack.authenticate:
1515
methods: [GET]
1616
requirements:
1717
_role: 'anonymous'
18+
19+
os2loop_login_preview.show:
20+
path: '/os2loop-login-hack/preview/show/{id}'
21+
# options:
22+
# parameters:
23+
# id: '.+'
24+
defaults:
25+
_title: 'Preview'
26+
_controller: '\Drupal\os2loop_login_hack\Controller\Os2loopPreviewContentController::show'
27+
methods: [GET]
28+
requirements:
29+
_permission: 'access content'

web/profiles/custom/os2loop/modules/os2loop_login_hack/src/Controller/Os2loopLoginHackController.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ public function __construct(
4949
*/
5050
public function start(Request $request): Response {
5151
try {
52+
$this->logger->info('Request: @request', [
53+
'@request' => json_encode([
54+
'method' => $request->getMethod(),
55+
'query' => $request->query->all(),
56+
'content' => (string) $request->getContent(),
57+
]),
58+
]);
59+
60+
return new Response('https://example.com/cura-login');
61+
5262
$data = json_decode($request->getContent(), associative: TRUE, flags: JSON_THROW_ON_ERROR);
5363
$username = $data['username'] ?? NULL;
5464
if (empty($username)) {

0 commit comments

Comments
 (0)