Package com.github.ebnew.ki4so.core.authentication.status

Examples of com.github.ebnew.ki4so.core.authentication.status.UserLoggedStatus


    credential = Mockito.mock(Credential.class);
    authentication = Mockito.mock(Authentication.class);
    Mockito.when(authenticationManager.authenticate(credential)).thenReturn(authentication);
    Mockito.when(authentication.getPrincipal()).thenReturn(Mockito.mock(Principal.class));
    List<UserLoggedStatus> list = new ArrayList<UserLoggedStatus>();
    UserLoggedStatus loggedStatus = new UserLoggedStatus("test", "1001");
    list.add(loggedStatus);
    Mockito.when(userLoggedStatusStore.findUserLoggedStatus(Mockito.anyString())).thenReturn(list);
    App app = new App();
    Mockito.when(appService.findAppById(Mockito.anyString())).thenReturn(app);
    Assert.assertEquals(1, this.ki4soService.getAppList(credential).size());
View Full Code Here


          attributes.put(KI4SO_CLIENT_EC_KEY, encryCredential);
          attributes.put(WebConstants.SERVICE_PARAM_NAME, service);
          authentication.setAttributes(attributes);
         
          //更新用户登录状态到存储器中。
          UserLoggedStatus status = new UserLoggedStatus(principal.getId(), clientApp.getAppId(), authentication.getAuthenticatedDate());
          userLoggedStatusStore.addUserLoggedStatus(status);
        }
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.github.ebnew.ki4so.core.authentication.status.UserLoggedStatus

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.