Examples of rolesAllowed()


Examples of org.conventionsframework.qualifier.SecurityMethod.rolesAllowed()

    public abstract boolean checkUserPermissions(String[] rolesAllowed);

    private String[] extractMethodRoles(Method m) {
        if (m.isAnnotationPresent(SecurityMethod.class)) {
            SecurityMethod securityMethod = m.getAnnotation(SecurityMethod.class);
            return securityMethod.rolesAllowed();
        }
        return null;
    }

    private String getFatalMessage(String message) {
View Full Code Here

Examples of org.jboss.soa.esb.services.security.SecurityConfig.Builder.rolesAllowed()

  @Test
    public void rolesAllowed() throws ConfigurationException, SecurityServiceException
    {
        Builder builder = new SecurityConfig.Builder("SuccessfulLogin");
        builder.runAs("esbRole");
        builder.rolesAllowed("esbRole");
        SecurityConfig configInfo = builder.build();
    SecurityContext context = new SecurityContext(subject, SecurityContext.getConfigurationTimeout());
        service.authenticate( configInfo, context, null );
        boolean checkRolesAllowed = service.checkRolesAllowed(configInfo.getRolesAllowed(), context);
        assertTrue(checkRolesAllowed);
View Full Code Here

Examples of org.jboss.soa.esb.services.security.SecurityConfig.Builder.rolesAllowed()

    final String moduleName = securityFragment.getAttribute(ListenerTagNames.MODULE_NAME_TAG);

    Builder builder = new SecurityConfig.Builder(moduleName);
    builder.runAs(securityFragment.getAttribute(ListenerTagNames.RUN_AS_TAG));
    builder.useCallerIdentity(securityFragment.getAttribute(ListenerTagNames.USE_CALLERS_IDENTIDY_TAG));
    builder.rolesAllowed(securityFragment.getAttribute(ListenerTagNames.ROLES_ALLOWED));
    builder.callBackhandler(securityFragment.getAttribute(ListenerTagNames.CALLBACK_HANDLER_TAG));

    ConfigTree[] children = securityFragment.getChildren("property");
    for (ConfigTree configTree : children)
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.