Package org.jboss.soa.esb.services.security.SecurityConfig

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


    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.