goja-web/src/main/java/goja/mvc/Controller.java
protected <U extends Model> Optional<AppUser<U>> getPrincipal() {
        if (Securitys.isLogin()) {
            final AppUser<U> appUser = Securitys.getLogin();
            return Optional.of(appUser);
        }
        return Optional.absent();
    }
protected <U extends Model> Optional<AppUser<U>> getPrincipal() {
        if (Securitys.isLogin()) {
            final AppUser<U> appUser = Securitys.getLogin();
            return Optional.of(appUser);
        }
        return Optional.absent();
    }
protected < U extends Model > Optional < AppUser < U > > getPrincipal ( ) { if ( Securitys . isLogin ( ) ) { final AppUser < U > appUser = Securitys . getLogin ( ) ; return Optional . of ( appUser ) ; } return Optional . absent ( ) ; }
The current Shiro login user. <p/> If it opens the secruity function can call this method to
obtain the logged in user.

@param <U> Generic parameter.
@return Shiro login user.
The current Shiro login user . <p / > If it opens the secruity function can call this method to obtain the logged in user .