Authenticating to ScienceBase and retaining your authentication for future requests using JOSSO.
To authenticate you must obtain a JOSSO session ID. There are two ways to get this ID. The first way is from the JOSSO signon page. Username and password are sent in as request parameters.
From this session, the value of the cookie with the name "JOSSO_SESSIONID" is your JOSSO session ID.
The second way to get the JOSSO session ID is from the JOSSO helper in ScienceBase Catalog. Username and password are sent in an HTTP basic authentication header.
If successful, this will return JSON similar to the following:
The value of the jossoSessionId variable is the JOSSO session ID.
Once you have a JOSSO session ID, you can make requests on any page on ScienceBase that the authenticated user has access to by adding the parameter "josso=[JOSSO_SESSIONID]". Eg: https://www.sciencebase.gov/catalog/item/4f4e4b24e4b07f02db6aea14?josso=[JOSSO_SESSIONID]