I used this library recently for audience mapping and role mapping with Keycloak 11.0.0 and I must have to create classes that inherits from configurations and set the corresponding JsonProperty attribute value. For instance:
public class KeycloakClientConfig : ClientConfig
{
[JsonProperty("multivalued")]
public string MultiValued { get; set; }
[JsonProperty("usermodel.clientRoleMapping.clientId")]
public string UserModelClientRoleMappingClientId { get; set; }
[JsonProperty("userinfo.token.claim")]
public string CustomUserInfoTokenClaim { get; set; }
[JsonProperty("claim.name")]
public string CustomClaimName { get; set; }
[JsonProperty("access.token.claim")]
public string CustomAccessTokenClaim { get; set; }
[JsonProperty("id.token.claim")]
public string CustomIdTokenClaim { get; set; }
[JsonProperty("jsonType.label")]
public string JsonTypeLabel { get; set; }
}
If you turn this into a dictionary should be easy set such values.
Why don't configs of mappings into dictionary?
I used this library recently for audience mapping and role mapping with Keycloak 11.0.0 and I must have to create classes that inherits from configurations and set the corresponding JsonProperty attribute value. For instance:
If you turn this into a dictionary should be easy set such values.