Evan Bennett
06/17/2019, 1:11 AMinstall(Sessions) {
val sessionCookieKey = io.ktor.util.hex(environment.config.property("ktor.session.cookie.key").getString())
fun configureCookie(): CookieSessionBuilder<*>.() -> Unit = {
cookie.duration = null
cookie.domain = null
cookie.path = "/"
cookie.secure = true
cookie.httpOnly = true
cookie.extensions["SameSite"] = "Strict"
transform(SessionTransportTransformerMessageAuthentication(sessionCookieKey))
}
cookie<my.type.UuidV4>("SESSION_UUID", configureCookie())
cookie<java.util.Locale>("LOCALE", configureCookie())
}
I am getting an exception when I make a request to the server. (Which I will post as a reply.)
After looking in to this for a while, it appears that the SessionSerializerReflection.properties
contains [var java.util.Locale.baseLocale: sun.util.locale.BaseLocale!, var java.util.Locale.localeExtensions: sun.util.locale.LocaleExtensions!, var java.util.Locale.hashCodeValue: <http://kotlin.Int|kotlin.Int>, var java.util.Locale.languageTag: kotlin.String!]
which are all private transient
members of the java.util.Locale
class.
Is this a bug, or should I be doing this differently?Evan Bennett
06/17/2019, 1:13 AMEvan Bennett
06/17/2019, 1:17 AM