From 8a9187076d8b66771a769f263532c9509e21449c Mon Sep 17 00:00:00 2001 From: Minh Vuong Date: Sat, 30 Oct 2021 13:49:47 +0700 Subject: [PATCH] feat: add prefix arg for extract factory from origin token query param. --- src/ExtractorFactory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ExtractorFactory.php b/src/ExtractorFactory.php index 61d314e..94ace64 100644 --- a/src/ExtractorFactory.php +++ b/src/ExtractorFactory.php @@ -22,9 +22,9 @@ public static function fromOriginTokenHeader(string $issuer, string $header = 'A return new OriginTokenExtractor($issuer, AbstractExtractor::IN_HEADER, $header, $prefix); } - public static function fromOriginTokenQueryParam(string $issuer, string $queryParam): ExtractorInterface + public static function fromOriginTokenQueryParam(string $issuer, string $queryParam, string $prefix = ''): ExtractorInterface { - return new OriginTokenExtractor($issuer, AbstractExtractor::IN_QUERY_PARAM, $queryParam); + return new OriginTokenExtractor($issuer, AbstractExtractor::IN_QUERY_PARAM, $queryParam, $prefix); } public static function fromExtractors(ExtractorInterface ...$extractors): ExtractorInterface