Package org.apache.shiro.realm

Examples of org.apache.shiro.realm.SimpleAccountRealm


      monitoringService = CopperMonitorServiceDefaultProxy.getServiceProxy(copperMonitoringService);
      loginService = new DefaultLoginService();
      remoteInvocationExecutor = new DefaultRemoteInvocationExecutor();
    } else {
      monitoringService = CopperMonitorServiceSecurityProxy.secure(copperMonitoringService);
      final SimpleAccountRealm realm = new SimpleAccountRealm();
      realm.addAccount("user1", "pass1");     
      loginService = new SecureLoginService(realm);
      remoteInvocationExecutor = new SecureRemoteInvocationExecutor();
    }   
    SpringRemotingServer springRemotingServer = new SpringRemotingServer(monitoringService, port, host, loginService);
    springRemotingServer.setRemoteInvocationExecutor(remoteInvocationExecutor);
View Full Code Here


      @Override
      public void executeLogCreatingAction() {
        FutureTask<Void> futureTask = new FutureTask<Void>(new Runnable() {
          @Override
          public void run() {
            final SimpleAccountRealm realm = new SimpleAccountRealm();
            realm.addAccount("user1", "pass1");
            springRemotingServer = new SpringRemotingServer(CopperMonitorServiceSecurityProxy.secure(Mockito.mock(CopperMonitoringService.class))  ,8087,"localhost", new SecureLoginService(realm));
            springRemotingServer.start();
          }
        },null);
       
View Full Code Here

  private SecuritySystem securitySystem;

  @Before
  public void bindSubjectToThread() {
    // setup a simple realm for authc
    SimpleAccountRealm simpleAccountRealm = new SimpleAccountRealm();
    simpleAccountRealm.addAccount("anonymous", "anonymous");
    DefaultSecurityManager securityManager = new DefaultSecurityManager();
    securityManager.setRealm(simpleAccountRealm);

    SecurityUtils.setSecurityManager(securityManager);
View Full Code Here

        assertNotNull(info);
    }

    @Test
    public void beforeAttemptSupportingToken() {
        new SimpleAccountRealm();
    }
View Full Code Here

        addFilterChain("/*", AUTHC_BASIC);

    }

    private SimpleAccountRealm buildSAR() {
        SimpleAccountRealm sar = new SimpleAccountRealm();
        //              USER        PASS        ROLES ...
        sar.addAccount( "admin",    "admin",    "admin");
        sar.addAccount( "user",     "user",     "user","guest");
        return sar;
    }
View Full Code Here

TOP

Related Classes of org.apache.shiro.realm.SimpleAccountRealm

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.