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 authored and DumbergerL committed Jul 31, 2024
1 parent ec796c1 commit e3642b1
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 e3642b1

Please sign in to comment.