diff --git a/src/CTConfig.php b/src/CTConfig.php index 2326071..63e075e 100644 --- a/src/CTConfig.php +++ b/src/CTConfig.php @@ -168,6 +168,12 @@ public static function getSessionCookieString(): ?string return $cookieData ? (string) (new SetCookie($cookieData)) : null; } + public static function setSessionCookie(string $cookieString): void + { + $cookie = SetCookie::fromString($cookieString); + self::getConfig()->cookieJar->setCookie($cookie); + } + /** * @see CTConfig::authWithLoginToken() * @deprecated Will be removed in further version. Use CTConfig::authWithLoginToken() instead.