packages/angularjs-auth-keycloak/lib/profileData.js
function extractAttributeFields(attributeFields) {
  var attributes = {};
  if (attributeFields) {
    for (var field in attributeFields) {
      if (attributeFields[field].length > 0) {
        attributes[field] = attributeFields[field][0];
      }
    }
  }
  return attributes;
}
function extractAttributeFields(attributeFields) {
  var attributes = {};
  if (attributeFields) {
    for (var field in attributeFields) {
      if (attributeFields[field].length > 0) {
        attributes[field] = attributeFields[field][0];
      }
    }
  }
  return attributes;
}
function extractAttributeFields ( attributeFields ) { var attributes = { } ; if ( attributeFields ) { for ( var field in attributeFields ) { if ( attributeFields [ field ] . length > 0 ) { attributes [ field ] = attributeFields [ field ] [ 0 ] ; } } } return attributes ; }
Extract attribute fields from the profile data returned by Keycloak
@param attributeFields - Object which contains all the attributes of a user
Extract attribute fields from the profile data returned by Keycloak