public void convertAndAdd ( final CommonProfile profile , final Map < String , Object > profileAttributes , final Map < String , Object > authenticationAttributes ) { if ( profileAttributes != null ) { profileAttributes . entrySet ( ) . stream ( ) . forEach ( entry -> convertAndAdd ( profile , PROFILE_ATTRIBUTE , entry . getKey ( ) , entry . getValue ( ) ) ) ; } if ( authenticationAttributes != null ) { authenticationAttributes . entrySet ( ) . stream ( ) . forEach ( entry -> convertAndAdd ( profile , AUTHENTICATION_ATTRIBUTE , entry . getKey ( ) , entry . getValue ( ) ) ) ; } }
Convert the profile and authentication attributes if necessary and add them to the profile .