Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Code Block
titleJOSSO Signon Page Request
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.

Code Block
titleScienceBase Catalog JOSSO Helper Request
    Basic Authentication header with username and password set
    [name: Accept, value: application/json]
    [name: Content Type, value: application/json]
Request Parameters:
    includeJossoSessionId: true

If successful, this will return JSON similar to the following:

Code Block
titleScienceBase Catalog JOSSO Helper Response
    "fullDisplayName":"John L Long []",
    "displayName":"John L Long",

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:[JOSSO_SESSIONID]