Package org.jboss.resteasy.plugins.server.embedded

Examples of org.jboss.resteasy.plugins.server.embedded.SimplePrincipal


  {
    dispatcher = EmbeddedContainer.start("/", new SecurityDomain(){

      public Principal authenticate(String username, String password)
          throws SecurityException {
        return new SimplePrincipal(username);
      }

      public boolean isUserInRoll(Principal username, String role) {
        return username.getName().equals(role);
      }
View Full Code Here


            final ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);
            EJBClientContext.setSelector(selector);
            // register the client side interceptor
            final Registration clientInterceptorHandler = EJBClientContext.requireCurrent().registerInterceptor(112567,
                    new ClientSecurityInterceptor());
            SecurityContextAssociation.setPrincipal(new SimplePrincipal(userName));

            final Manage targetBean = EJBUtil.lookupEJB(TargetBean.class, Manage.class);
            final Manage bridgeBean = EJBUtil.lookupEJB(BridgeBean.class, Manage.class);

            //test direct access
View Full Code Here

            final ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);
            EJBClientContext.setSelector(selector);
            // register the client side interceptor
            final Registration clientInterceptorHandler = EJBClientContext.requireCurrent().registerInterceptor(112567,
                    new ClientSecurityInterceptor());
            SecurityContextAssociation.setPrincipal(new SimplePrincipal(userName));

            final Manage targetBean = EJBUtil.lookupEJB(TargetBean.class, Manage.class);
            final Manage bridgeBean = EJBUtil.lookupEJB(BridgeBean.class, Manage.class);

            //test direct access
View Full Code Here

  {
    dispatcher = EmbeddedContainer.start("/", new SecurityDomain(){

      public Principal authenticate(String username, String password)
          throws SecurityException {
        return new SimplePrincipal(username);
      }

      public boolean isUserInRole(Principal username, String role) {
        return username.getName().equals(role);
      }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.plugins.server.embedded.SimplePrincipal

Copyright © 2018 www.massapicom. 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.