// Add the authenticated username to the person object
// the login name may have been provided or reset by the security provider
// so this needs to be done after authentication.
person.setAttribute(IPerson.USERNAME, securityContext.getPrincipal().getUID());
// Retrieve the additional descriptor from the security context
IAdditionalDescriptor addInfo = person.getSecurityContext().getAdditionalDescriptor();
// Process the additional descriptor if one was created
if (addInfo != null) {
// Replace the passed in IPerson with the additional descriptor if the
// additional descriptor is an IPerson object created by the security context
// NOTE: This is not the preferred method, creation of IPerson objects should be