Hi,
Im trying to configure a key-value table in the settings form of a custom identity provider in order to recover the values later when performing the authentication in the IdentityProvider.java class, I have written the default keycloak table code in the html:
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>{{:: 'key' | translate}}</th>
<th>{{:: 'value' | translate}}</th>
<th>{{:: 'actions' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="(key, value) in role.attributes | toOrderedMapSortedByKey">
<td>{{key}}</td>
<td><input ng-model="role.attributes[key]" class="form-control" type="text" name="{{key}}" id="attribute-{{key}}" /></td>
<td class="kc-action-cell" data-ng-click="removeAttribute(key)">{{:: 'delete' | translate}}</td>
</tr>
<tr>
<td><input ng-model="newAttribute.key" class="form-control" type="text" id="newAttributeKey" /></td>
<td><input ng-model="newAttribute.value" class="form-control" type="text" id="newAttributeValue" /></td>
<td class="kc-action-cell" data-ng-click="addAttribute()" data-ng-disabled="!newAttribute.key.length || !newAttribute.value.length">{{:: 'add' | translate}}</td>
</tr>
</tbody>
</table>
But i am I’m having problems understanding how the logic works, i would like to map the values of the table to a variable defined in identityProviderConfig.java and then define a get and a set method for this variable, like I have done before with simple variables, but I’m not being able to get it to work.
Does anyone have any idea how to recover the values of the table on a simple way in order to use them later?
Thanks In advance