SetCookie Event

Fired for every cookie set by the server.

Syntax

ANSI (Cross Platform)
virtual int FireSetCookie(OAuthSetCookieEventParams *e);
typedef struct {
const char *Name;
const char *Value;
const char *Expires;
const char *Domain;
const char *Path;
int Secure; int reserved; } OAuthSetCookieEventParams; Unicode (Windows) virtual INT FireSetCookie(OAuthSetCookieEventParams *e);
typedef struct {
LPCWSTR Name;
LPCWSTR Value;
LPCWSTR Expires;
LPCWSTR Domain;
LPCWSTR Path;
BOOL Secure; INT reserved; } OAuthSetCookieEventParams;
- (void)onSetCookie:(NSString*)name :(NSString*)value :(NSString*)expires :(NSString*)domain :(NSString*)path :(BOOL)secure;
#define EID_OAUTH_SETCOOKIE 11

virtual INT CLOUDKEYS_CALL FireSetCookie(LPSTR &lpszName, LPSTR &lpszValue, LPSTR &lpszExpires, LPSTR &lpszDomain, LPSTR &lpszPath, BOOL &bSecure);

Remarks

The SetCookie event is fired for every "Set-Cookie:" header received from the HTTP server.

The Name parameter contains the name of the cookie, with the corresponding value supplied in the Value parameter.

The Expires parameter contains an expiration time for the cookie (if provided by the server). The time format used is "Weekday, DD-Mon-YY HH:MM:SS GMT". If the server does not provide an expiration time, the Expires parameter will be an empty string. In this case, the convention is to drop the cookie at the end of the session.

The Domain parameter contains a domain name to limit the cookie to (if provided by the server). If the server does not provide a domain name, the Domain parameter will be an empty string. The convention in this case is to use the server specified in the URL (URLServer) as the cookie domain.

The Path parameter contains a path name to limit the cookie to (if provided by the server). If the server does not provide a cookie path, the Path parameter will be an empty string. The convention in this case is to use the path specified in the URL (URLPath) as the cookie path.

The Secure parameter specifies whether the cookie is secure. If the value of this parameter is True, the cookie value must be submitted through a secure (HTTPS) connection only.

Copyright (c) 2022 /n software inc. - All rights reserved.
Cloud Keys 2020 C++ Edition - Version 20.0 [Build 8157]