Skip to content

Latest commit

 

History

History

general

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

General claims transformations unit tests

This folder contains unit tests for Azure AD B2C general claims transformations. For more information, check out the General claims transformations article.

CopyClaim

Copy value of int1 into int1Result, and string1 into string1Result. The unit test defines the following elements:

  • ExperimentalTechnicalProfile - self-asserted technical profile. This technical profile renders the int1 and string1 claims with default values (you can change the values). The output claims transformation CopyString and CopyInt run the unit test. Select Continue to run the next orchestration step that shows the result.
  • ResultTechnicalProfile - self-asserted technical profile. This technical profile shows the int1Result and string1Result of this unit test.
  • CopyString and CopyInt claims transformations - the unit test.

live demo Live demo   Quick deploy Quick deploy   policy Policy   documentation Documentation

DoesClaimExist

  • ExperimentalTechnicalProfile - claims transformation technical profile. This technical profile renders initiates the int1, long1 and string1 claims with default values. The output claims transformations run the unit test for each type of the claim. Select Continue to run the next orchestration step that shows the result.
  • ResultTechnicalProfile - self-asserted technical profile. This technical profile shows the string1Result, int1Result , boolean1Result , long1Result , date1Result , and stringCollection1Result of this unit test.
  • Claims transformations:
    • CheckString - the string unit test.
    • CheckInt - the int unit test.
    • CheckBoolean - the Boolean unit test.
    • CheckLong - the long unit test.
    • CheckDate - the date unit test.
    • CheckStringCollection - the string collection unit test.

live demo Live demo   Quick deploy Quick deploy   policy Policy   documentation Documentation

Hash

Hashes the provided plain text stringToHash claim using the salt and a secret that is stored as policy key B2C_1A_12345Secret. The secret of this policy key is 12345. The hashing algorithm used is SHA-256.. The unit test defines the following elements:

  • ExperimentalTechnicalProfile - self-asserted technical profile. This technical profile renders the stringToHash and salt claims with default values (you can change the values). The output claims transformation GenerateHash runs the unit test. Select Continue to run the next orchestration step that shows the result.
  • ResultTechnicalProfile - self-asserted technical profile. This technical profile shows the result of this unit test.
  • GenerateHash claims transformation - the unit test.

live demo Live demo   Quick deploy Quick deploy   policy Policy   documentation Documentation