WikiSession source = (WikiSession)e.getSource();
if ( this.equals( source ) && m_status == AUTHENTICATED )
{
// To prepare for refresh, set the new full name as the primary principal
UserProfile[] profiles = (UserProfile[])e.getTarget();
UserProfile newProfile = profiles[1];
if ( newProfile.getFullname() == null )
{
throw new IllegalStateException( "User profile FullName cannot be null." );
}
Set<Principal> principals = m_subject.getPrincipals();
m_loginPrincipal = new WikiPrincipal( newProfile.getLoginName() );
// Add the login principal to the Subject, and set the built-in roles
principals.clear();
principals.add( m_loginPrincipal );
principals.add( Role.ALL );