@CallerPrincipal // to force it to be before group in getCallerPrincipal, otherwise we aren't deterministic public static class User implements Principal { private final String name; public User(final String name) { this.name = name; } @Override public String getName() { return name; } } }
public Principal getCallerPrincipal(SecurityService securityService) { return securityService.getCallerPrincipal(); }
public boolean isCallerInRole(SecurityService securityService, String roleName) { return securityService.isCallerInRole(roleName); }
private static Context getRoot() { ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); Context context = containerSystem.getJNDIContext(); return context; }
@SuppressWarnings("unchecked") @Override public void after(final SecurityContext securityContext) throws WorkCompletedException { final SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class); final Object loginObj = securityService.disassociate(); if (loginObj != null) { try { securityService.logout(loginObj); } catch (final LoginException e) { //Ignore } } }
public static void destroy() { final Assembler assembler = SystemInstance.get().getComponent(Assembler.class); if (assembler != null) { assembler.destroy(); } else { SystemInstance.reset(); } instance = null; }
private void onLogout(final HttpServletRequest request) { securityService.onLogout(request); }
private static Context openejbContext() { return SystemInstance.get().getComponent(ContainerSystem.class).getJNDIContext(); } }
@SuppressWarnings("unchecked") @Override public void after(final SecurityContext securityContext) throws WorkCompletedException { final SecurityService securityService = SystemInstance.get().getComponent(SecurityService.class); final Object loginObj = securityService.disassociate(); if (loginObj != null) { try { securityService.logout(loginObj); } catch (final LoginException e) { //Ignore } } }
protected Principal getCallerPrincipal(final SecurityService securityService) { return securityService.getCallerPrincipal(); }
@Override public boolean isUserInRole(final String s) { return SystemInstance.get().getComponent(SecurityService.class).isCallerInRole(s); }
public static void destroy() { Assembler assembler = SystemInstance.get().getComponent(Assembler.class); assembler.destroy(); SystemInstance.reset(); instance = null; }
private static Context getRoot() { final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); return containerSystem.getJNDIContext(); }
protected Principal getCallerPrincipal(final SecurityService securityService) { return securityService.getCallerPrincipal(); }
private static Context getRoot() { final ContainerSystem containerSystem = SystemInstance.get().getComponent(ContainerSystem.class); return containerSystem.getJNDIContext(); }
@Override public Principal getCurrentPrincipal() { final SecurityService<?> service = SystemInstance.get().getComponent(SecurityService.class); if (service != null) { return service.getCallerPrincipal(); } return null; }
@Override public Principal getCurrentPrincipal() { org.apache.openejb.spi.SecurityService<?> service = SystemInstance.get().getComponent(org.apache.openejb.spi.SecurityService.class); if(service != null) { return service.getCallerPrincipal(); } return null; }
@Override public Principal getCurrentPrincipal() { final SecurityService<?> service = SystemInstance.get().getComponent(SecurityService.class); if (service != null) { return service.getCallerPrincipal(); } return null; }
@Override public Principal getUserPrincipal() { return SystemInstance.get().getComponent(SecurityService.class).getCallerPrincipal(); }
@Override public Principal getUserPrincipal() { return SystemInstance.get().getComponent(SecurityService.class).getCallerPrincipal(); }