List of usage examples for java.security Principal getName
public String getName();
From source file:ch.rasc.s4ws.portfolio.web.PortfolioController.java
@MessageMapping("/trade") public void executeTrade(Trade trade, Principal principal) { trade.setUsername(principal.getName()); logger.debug("Trade: " + trade); this.tradeService.executeTrade(trade); }
From source file:runtheshow.resource.webservice.UserService.java
@RequestMapping("/current") public String getCurrentUser(Principal user) { return metier.getUserByName(user.getName()).toString().replace("null", ""); }
From source file:com.pw.ism.controllers.AccountController.java
@RequestMapping public ModelAndView getDetails(Principal principal) { String userName = principal.getName(); User currentUser = userRepo.findBySsoId(userName); return new ModelAndView("account/details", "user", currentUser); }
From source file:fm.push.web.PortfolioController.java
@CrossOrigin @MessageMapping("/trade") public void executeTrade(Trade trade, Principal principal) { trade.setUsername(principal.getName()); logger.debug("Trade: " + trade); this.tradeService.executeTrade(trade); }
From source file:org.svb.imc.web.IncidentController.java
@MessageMapping("/message") public void receiveMessage(Message message, Principal principal) { message.setUser(principal.getName()); logger.debug("Message from: " + message.getUser()); this.messageService.addMessage(message); }
From source file:com.eretailservice.security.BookingRestController.java
private void validateUser(Principal principal) { String userId = principal.getName(); this.accountRepository.findByUsername(userId).orElseThrow(() -> new UserNotFoundException(userId)); }
From source file:org.svb.imc.web.IncidentController.java
@MessageMapping("/incident") public void receiveIncident(Incident incident, Principal principal) { incident.setUser(principal.getName()); logger.debug("Incident from: " + incident.getUser()); this.incidentService.addIncident(incident); }
From source file:com.epam.ta.reportportal.database.entity.sharing.Shareable.java
public void setOwner(Principal principal) { acl = new Acl(principal.getName()); }
From source file:cn.sephen.GreetingController.java
@RequestMapping("/greeting") public Greeting greeting(Principal user) { return new Greeting(counter.incrementAndGet(), String.format(template, user.getName())); }
From source file:com.epam.ta.reportportal.demo_data.DemoDataController.java
@PostMapping @PreAuthorize(PROJECT_LEAD)// w w w. ja va2s.co m DemoDataRs generate(@PathVariable String projectName, @Validated @RequestBody DemoDataRq demoDataRq, Principal principal) { return demoDataService.generate(demoDataRq, projectName, principal.getName()); }