Authenticate

API calls to Transaction Manager for Microservices (MicroTx) require authentication. Pass a valid authentication token with every API call.

To access the MicroTx REST resources over HTTPS, request for an authentication token and store the authentication token in an environment variable:

  1. Set up an identity provider to manage access to MicroTx. You can use the following identity providers to create the authentication information and secure communication.

    • Oracle IDCS
    • Oracle IAM
    • Keycloak
    • Microsoft Azure Active Directory and Active Directory

    To set up Oracle IAM and Oracle IDCS as an identity provider, see Use Oracle Identity Providers in Transaction Manager for Microservices Developer Guide.

    If you want to use Keycloak or Microsoft AD as the identity provider, refer to their product documentation for information about setting up the identity provider.

  2. Note down the values for client ID, user name, and password to access MicroTx.

  3. Create an access token using the client ID and client secret. The process to create an authentication token depends on the identity provider that you have set up to manage access to MicroTx.

    To create an access token using Oracle IAM and Oracle IDCS, see Create an Access Token in Transaction Manager for Microservices Developer Guide.

  4. Store the authentication cookie in an environment variable, as shown in the following example for a Linux host.
    export OTMM_COOKIE="eyJh...x_THw"

    The example value has been truncated with ellipses (...) for readability.

After you obtain the authentication token, use the token in the authorization header while making subsequent API calls to the service.