GETCOOKI: Retrieving a Browser Cookie Value

How to:

Security credentials can come from many sources and be provided in several different formats. Some security credentials from third-party single sign-on products are passed in the form of a browser cookie. The Reporting Server can use the GETCOOKI function to retrieve the value of a browser cookie passed to it by the client.

Syntax: How to Retrieve a Cookie Value

GETCOOKI('cookie_name', length)




Is the name of the browser cookie whose value is being retrieved. The maximum length of the cookie name is 80 bytes. If the cookie is not set or its name exceeds 80 characters, the function will return Invalid Cookie Name.


Alphanumeric (An)

Is the length of the cookie. It can be the name of the field that contains the result, or the format of the output value enclosed in single quotation marks. If the length n specified is greater than the actual length of the retrieved cookie, the result will be padded with blanks. It is always recommended to use the function TRUNCATE(arg1) on return from GETCOOKI to remove extra trailing blanks.

Example: Retrieving the Value of a Browser Cookie

The following function call retrieves the value of the ObSSOCookie created by Oracle Access manager (formerly Oblix):

GETCOOKI('ObSSOCookie', 'A400')