@@ -11,6 +11,7 @@ package AzureFunctionsRpcMessages;
1111
1212import "google/protobuf/duration.proto" ;
1313import "identity/ClaimsIdentityRpc.proto" ;
14+ import "shared/NullableTypes.proto" ;
1415
1516// Interface exported by the server.
1617service FunctionRpc {
@@ -375,6 +376,44 @@ message RpcException {
375376 string message = 2 ;
376377}
377378
379+ // Http cookie type. Note that only name and value are used for Http requests
380+ message RpcHttpCookie {
381+ // Enum that lets servers require that a cookie shouoldn't be sent with cross-site requests
382+ enum SameSite {
383+ None = 0 ;
384+ Lax = 1 ;
385+ Strict = 2 ;
386+ }
387+
388+ // Cookie name
389+ string name = 1 ;
390+
391+ // Cookie value
392+ string value = 2 ;
393+
394+ // Specifies allowed hosts to receive the cookie
395+ NullableString domain = 3 ;
396+
397+ // Specifies URL path that must exist in the requested URL
398+ NullableString path = 4 ;
399+
400+ // Sets the cookie to expire at a specific date instead of when the client closes.
401+ // It is generally recommended that you use "Max-Age" over "Expires".
402+ NullableTimestamp expires = 5 ;
403+
404+ // Sets the cookie to only be sent with an encrypted request
405+ NullableBool secure = 6 ;
406+
407+ // Sets the cookie to be inaccessible to JavaScript's Document.cookie API
408+ NullableBool http_only = 7 ;
409+
410+ // Allows servers to assert that a cookie ought not to be sent along with cross-site requests
411+ SameSite same_site = 8 ;
412+
413+ // Number of seconds until the cookie expires. A zero or negative number will expire the cookie immediately.
414+ NullableDouble max_age = 9 ;
415+ }
416+
378417// TODO - solidify this or remove it
379418message RpcHttp {
380419 string method = 1 ;
@@ -387,4 +426,5 @@ message RpcHttp {
387426 bool enable_content_negotiation = 16 ;
388427 TypedData rawBody = 17 ;
389428 repeated RpcClaimsIdentity identities = 18 ;
429+ repeated RpcHttpCookie cookies = 19 ;
390430}
0 commit comments