Skip to Main Content

Micro Services

Laboratory for Computer Science Research

Claims Transformation

Claims transformation is a feature of the microservice that allows the returned data from various providers to mesh with your application.

Claims transformation allows you to convert the below claims data, returned by an example provider, to suit your application. The example provider returns “123456789” as the primary user ID. This does uniquely identify the user, but it is not applicable to our demo application.

Let’s examine the “secondary_claims” returned by the example provider, containing the raw underlying data from the provider:

Example JSON demonstrating an excess of unrelated data, with the necessary data embedded

The necessary information, the NetID (net_id), is embedded within the raw data, but, by default, the example provider returns the Internal ID (internal_id). Let’s utilize claims transformation to instead return the Net ID for our purposes.

Returning the NetID specifically is simple. Modify the application’s example provider transformer to return the following: “sc[“net_id”]“.

This modification will return the value of the “net_id” as the new primary claim.