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:
-
Create an OAuth 2.0 or OAuth 2.0 (Azure) authorization profile.
-
Click Get ID Token in ID Token (Optional):
-
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:
Groovy
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: