Package com.swinarta.sunflower.core.model

Examples of com.swinarta.sunflower.core.model.User


  }

  @Get("json")
  public SgwtRestFetchResponseBase represent(){
      Authentication auth = SecurityContextHolder.getContext().getAuthentication();
      User actor = (User)auth.getPrincipal();
     
      DisplayLogin disp = mapper.map(actor, DisplayLogin.class);
     
      SgwtRestFetchResponseBase resp = new SgwtRestFetchResponseBase(disp);
   
View Full Code Here


    }else   if(type.equalsIgnoreCase("cancelout")){
      toAdd = true;
      reason = StockUpdateReason.TR_OUT_C;
    }
   
    User user = new User();
    user.setId(userId);
   
    UsernamePasswordAuthenticationToken token = new UsernamePasswordAuthenticationToken(user, null);   
    SecurityContextHolder.getContext().setAuthentication(token);
    coreManager.updateStockRemote(transferId, reason, toAdd);
  }
View Full Code Here

  }
 
   public boolean verify(String identifier, char[] secret){
     boolean value =  super.verify(identifier, secret);
     if(value){
          User user = new User();
          user.setId(9);
          user.setUsername(identifier);

          Authentication auth = new UsernamePasswordAuthenticationToken(user,secret);
          SecurityContextHolder.getContext().setAuthentication(auth);
     }
     return value;
View Full Code Here

TOP

Related Classes of com.swinarta.sunflower.core.model.User

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.