+ public final static Authentication getAuthentication() {
+ Set<Authentication> authens = getSubject().getPrincipals(
+ Authentication.class);
+ if (authens != null && !authens.isEmpty()) {
+ Principal principal = authens.iterator().next();
+ Authentication authentication = (Authentication) principal;
+ return authentication;
+ }
+ throw new ArgeoException("No authentication found");
+ }