Skip to content

Commit f98b9eb

Browse files
author
Greg Bowler
authored
Merge pull request #105 from PhpGt/htmldocumentprotector-return-token
Return token once generated
2 parents d316782 + 66ee23c commit f98b9eb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/HTMLDocumentProtector.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct(
4747
*/
4848
public function protectAndInject(
4949
string $tokenSharing = self::ONE_TOKEN_PER_PAGE
50-
):void {
50+
):string {
5151
$forms = $this->document->forms;
5252

5353
if($forms->length > 0) {
@@ -121,6 +121,8 @@ public function protectAndInject(
121121
}
122122

123123
$meta->setAttribute("content", $token);
124+
125+
return $token;
124126
}
125127

126128
/**

0 commit comments

Comments
 (0)