Skip to content

Commit

Permalink
Add matching method for setting the session cookie in config
Browse files Browse the repository at this point in the history
  • Loading branch information
devdot committed Jul 30, 2024
1 parent 420bb75 commit 26119cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CTConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 <code>CTConfig::authWithLoginToken()</code> instead.
Expand Down

0 comments on commit 26119cc

Please sign in to comment.