NewAppCookies returns the cookie names for the app session token for the given hostname. The subdomain cookie is unique per workspace proxy and is based on a hash of the workspace proxy subdomain hostname. See SubdomainAppSessionTokenCookie for more details.
(hostname string)
| 20 | // based on a hash of the workspace proxy subdomain hostname. See |
| 21 | // SubdomainAppSessionTokenCookie for more details. |
| 22 | func NewAppCookies(hostname string) AppCookies { |
| 23 | return AppCookies{ |
| 24 | PathAppSessionToken: codersdk.PathAppSessionTokenCookie, |
| 25 | SubdomainAppSessionToken: SubdomainAppSessionTokenCookie(hostname), |
| 26 | SignedAppToken: codersdk.SignedAppTokenCookie, |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // CookieNameForAccessMethod returns the cookie name for the long-lived session |
| 31 | // token for the given access method. |