2

I want to access an API endpoint which requires OpenAM authentication. If I am trying to directly access this API endpoint, it will redirect (302) to OpenAM Auth page.

I am able to get a valid OpenAM token using https://github.com/jathanism/python-opensso.

But I am not getting how to use that valid token in-order to access the API endpoint.

I am trying to do this with Python.

1 Answers1

0

If your API is protected by a policy agent, then the solution is simple, just include the session ID as a session cookie in the incoming request:

Cookie: iPlanetDirectoryPro=<sessionId-obtained-via-python-opensso

iPlanetDirectoryPro is the default name of the session cookie, it may be called differently in your environment.

Peter Major
  • 2,975
  • 4
  • 16
  • 17