public String principal() {
        if (getSubject() != null) {
            // Get the principal to print out
            Object principal = getSubject().getPrincipal();
            return principal.toString();
        }
        return "Guest";
    }
public String principal ( ) { if ( getSubject ( ) != null ) { Object principal = getSubject ( ) . getPrincipal ( ) ; return principal . toString ( ) ; } return "Guest" ; }
输出当前用户信息，通常为登录帐号信息。

@return 当前用户信息