Middleware for encrypting & decrypting cookies. This middleware layer will encrypt/decrypt the named cookies with the given key and cipher type. To support multiple keys/cipher types use this middleware multiple times. Cookies in request data will be decrypted, while cookies in response headers will be encrypted automatically. If the response is a {@link \UIM\Http\Response}, the cookie data set with `withCookie()` and `cookie()`` will also be encrypted. The encryption types and padding are compatible with those used by CookieComponent for backwards compatibility.
Inherited | Abstract | Final | Static | Datatype | Header |
---|---|---|---|---|---|
IResponse | IResponse encodeSetCookieHeader(IResponse response) | ||||
this(Json[string] | this(Json[string] cookieNames, string encryptionKey, string cipherType = "aes") | ||||
IResponse | IResponse process(IServerRequest serverRequest, IRequestHandler handler) | ||||
string | string _getCookieEncryptionKey() | ||||
IServerRequest | IServerRequest decodeCookies(IServerRequest serverRequest) | ||||
DResponse | DResponse encodeCookies(DResponse response) |