OpenID Connect

Applies to ReadyAPI 3.51, last modified on March 21, 2024

OpenID Connect is an extension of the OAuth 2.0 framework. The client application uses it to verify a user’s identity. To do this, the client uses the authorization server. The server performs the authentication and returns the ID token - encoded information about the user.

Configure OpenID Connect

To configure OpenID Connect:

  1. Create an OAuth 2.0 or OAuth 2.0 (Azure) authorization profile.

  2. Click Get ID Token in ID Token (Optional):

    Click the image to enlarge it.

    Click the image to enlarge it.

  3. Select the needed authentication grant type and configure the request. The following topics describe the corresponding settings:

How to use ID token

ReadyAPI stores the ID token in the authorization profile object.

You can get the value of the token by using the Groovy script:


// Get the authorization profile
def authEntry = context.testCase.testSuite.project.getAuthRepository().getEntry("OAuth Profile Name");

// Get the ID token
def idToken = authEntry.getIdToken();

// Save the ID token as the result of the Groovy test step:
return idToken;

Then, use the property expansions to insert the token wherever you need. For example, if you get the ID token in the Get ID Token test step, you can get the ID token by using the following property expansion:

${Get ID Token#result}

See Also

OAuth 2.0 and OAuth 2.0 (Azure)
Authentication Types

Highlight search results