Package org.springframework.nanotrader.web.security

Examples of org.springframework.nanotrader.web.security.CustomUser


  @Before
  public  void login() {
    Collection<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>();
    grantedAuthorities.add(new SimpleGrantedAuthority(API_ROLE));   
    UserDetails user = new CustomUser(ServiceTestConfiguration.USER_ID, ServiceTestConfiguration.PASSWORD, grantedAuthorities, ServiceTestConfiguration.ACCOUNT_ID, ServiceTestConfiguration.PROFILE_ID, ServiceTestConfiguration.AUTH_TOKEN);
    Authentication authentication = new TestingAuthenticationToken(user, ServiceTestConfiguration.PASSWORD, (List<GrantedAuthority>)grantedAuthorities );
    SecurityContextHolder.getContext().setAuthentication(authentication);
  }
View Full Code Here

TOP

Related Classes of org.springframework.nanotrader.web.security.CustomUser

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.