Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Config of Mappings into Dictionaries #46

Open
alexfdezsauco opened this issue Mar 22, 2021 · 2 comments
Open

Convert Config of Mappings into Dictionaries #46

alexfdezsauco opened this issue Mar 22, 2021 · 2 comments

Comments

@alexfdezsauco
Copy link

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:

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.

@kevintuke
Copy link

Have same issue, like the idea of using a dictionary.

@lvermeulen
Copy link
Owner

I welcome a pull request for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants