@Component(value="squashtest.core.user.UserContextService") public class SpringSecurityUserContextService extends Object implements UserContextService
UserContextService backed by Spring Security.| Constructor and Description |
|---|
SpringSecurityUserContextService() |
| Modifier and Type | Method and Description |
|---|---|
org.springframework.security.core.Authentication |
getPrincipal() |
String |
getUsername() |
boolean |
hasRole(String role) |
public String getUsername()
getUsername in interface UserContextServicepublic boolean hasRole(String role)
hasRole in interface UserContextServicepublic org.springframework.security.core.Authentication getPrincipal()
getPrincipal in interface UserContextServicenull if no user authenticated.Copyright © 2010–2017 Henix, henix.fr. All rights reserved.