How to create OWA_COOKIE PLSQL

The Oracle Web Agent (OWA) provide the web users with an easy way to send and get cookies throw the browser header using OWA_COOKIE package.
there is two types can be used for OWA_COOKIE
  1. type vc_arr is table of varchar2(4000) index by binary_integer.
  2. type cookie is record (name varchar2(4000),vals vc_arr,num_vals integer); 
  1. Open Header
  2. Send Cookie 
  3. Close Header 
  4. Redirect to another page. 
don't forget to close the header. 

if for some reason you find the cookie value printed into the screen then your document header maybe was opened  and closed before your cookie code. 

BEGIN
OWA_UTIL.MIME_HEADER ('text/html', FALSE);
OWA_COOKIE.SEND (NAME    => 'REGIND',VALUE   => TWBKBSSF.F_ENCODE ('N'));
OWA_UTIL.HTTP_HEADER_CLOSE;
OWA_UTIL.REDIRECT_URL ('xwskstrg.P_RegsAddCrse');
END;
make sure that you encrypt the value of the cookie if it will contain a sensitive data.

filter attribute that checks whether current connection is secured

using APS.net Core to mark all website pages working with https protocol we will do this using IAuthorizationFilter. and here is an exampl...