title: Mapping a custom JSON into ClaimActions
body: <p>I am developing a Angular based website in which a user is required to login using a custom OAuth2 third party authentication provider. .Net core web API is the backend. The response received from the user end point is in JSON and it is having the following format: </p>
  
  <pre><code>{
      "dataSources": {
          "profile": {
              "username": "xyz"
          }
      },
      "profile": {
          "id": "87dfkajdfd998df"
      },
      "errors": {}
  }
  </code></pre>
  
  <p>The code I am currently using is as follows: </p>
  
  <pre><code>builder.AddOAuth(oauth2Configuration.Issuer,
  options =&gt; {
      options.ClientId = oauth2Configuration.ClientId;
      options.ClientSecret = oauth2Configuration.ClientSecret;
      options.Scope.Add(oauth2Configuration.Scope); 
      options.ClaimsIssuer = oauth2Configuration.Issuer;
      options.CallbackPath = new PathString(oauth2Configuration.ResponseType);
      options.AuthorizationEndpoint = oauth2Configuration.Authority;
      options.TokenEndpoint = oauth2Configuration.EndSessionEndpoint;
      options.UserInformationEndpoint = oauth2Configuration.UserInfoEndpoint;
      options.SaveTokens = true;
  
      // Below mapping does not seem to work
      options.ClaimActions.MapJsonSubKey(ClaimTypes.Name, "dataSources", "profile.username");
      options.ClaimActions.MapJsonKey(ClaimTypes.SerialNumber, "profile.id");
  
      // Remaining code       
  })
  </code></pre>
  
  <p>After authenticating with the above code, the claims list is always empty.</p>
  
  <p>Has anyone encountered a similar situation in which claim mapping was done for custom JSON data?</p>