Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Resources/views/Collector/partials/auth.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
<td>Request</td>
<td>
{% if call.request and call.request.jwt|default(false) %}
{{ dump(call.request.jwt.decoded.header|json_decode) }}
{{ dump(call.request.jwt.decoded.payload|json_decode) }}
{{ dump(call.request.jwt.decoded.header|simple_json_decode) }}
{{ dump(call.request.jwt.decoded.payload|simple_json_decode) }}
{% endif %}
</td>
</tr>
<tr>
<td>Response</td>
<td>
{% if call.response and call.response.jwt|default(false) %}
{{ dump(call.response.jwt.decoded.header|json_decode) }}
{{ dump(call.response.jwt.decoded.payload|json_decode) }}
{{ dump(call.response.jwt.decoded.header|simple_json_decode) }}
{{ dump(call.response.jwt.decoded.payload|simple_json_decode) }}
{% endif %}
</td>
</tr>
Expand Down
12 changes: 2 additions & 10 deletions Twig/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ public function getFilters(): array
new TwigFilter('simple_http_beautify', array($this, 'format'), $safe),
new TwigFilter('simple_http_format_http_code', array($this, 'formatHttpCode'), $safe),
new TwigFilter('simple_http_format_http_code_as_badge', array($this, 'formatHttpCodeAsSfBadge'), $safe),
new TwigFilter('simple_http_md5', array($this, 'md5')),
new TwigFilter('simple_http_md5', 'md5'),
new TwigFilter('simple_http_include_asset', array($this, 'assetInclude'), $safe),
new TwigFilter('simple_http_format_ms', array($this, 'formatMilliseconds')),
new TwigFilter('simple_http_format_num', array($this, 'numberFormat')),
new TwigFilter('simple_json_decode', 'json_decode'),
];
}

Expand Down Expand Up @@ -72,15 +73,6 @@ public function formatMilliseconds($ms): string
return $this->numberFormat($ms * 1000) . " ms";
}

/**
* @param $str
* @return string
*/
public function md5($str): string
{
return md5($str);
}

public function assetInclude(string $file): string
{
try {
Expand Down