private void setSubjectPrincipals ( ) { if ( null != userPrincipal ) { this . subject . getPrincipals ( ) . add ( userPrincipal ) ; } if ( null != rolePrincipals ) { for ( Principal rolePrincipal : rolePrincipals ) { this . subject . getPrincipals ( ) . add ( rolePrincipal ) ; } } }
Set the principals for the Subject