Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How can we validate token for customer

Options

Hi,

I am new to parasoft virtualize and wanted to know if we can validate token for particular customer? I want to see if token is matching with customer otherwise throws error message.

Comments

  • OmarR
    OmarR Posts: 234 admin
    edited January 2020
    Options

    Welcome to the forums!
    Yes, you can do this using responder correlation or data source correlation.
    Is the token static?
    Is the token found within the payload or as a header value?

  • jithenderreddy
    Options

    token is dynamic and it is in the header value.

  • OmarR
    OmarR Posts: 234 admin
    edited January 2020
    Options

    If the token is dynamic, you'll likely want to use a data source to keep a list of tokens you'll want to successfully respond to. Below is a quick example to get you started.

    First, we can add a "Table" data source to keep a list of the available tokens. We then configure our responder>data source correlation to match based on request headers as shown below (Right-click>View Image).

    Give this a try and let us know if you have any questions.

  • jithenderreddy
    Options

    thank you