// This is virtual to allow acceptance tests to disable claims mapping
 public virtual void ConfigureClaimsMapping(IClaimsMappingBuilder mapper)
 {
     mapper
     // this will map the claim UserId to every property on a command called UserId
     // this can be used if a convention based approach is being used
     .MapClaimToPropertyName("UserId", "UserId")
     // this will map the claim UserId to the property AuthorId on the AddNewPostCommand command
     .MapClaimToCommandProperty <AddNewPostCommand>("UserId", cmd => cmd.AuthorId);
 }
Пример #2
0
 public override void ConfigureClaimsMapping(IClaimsMappingBuilder mapper)
 {
     // don't set up claims mapping
 }