org.openwms.web.flex.security
Class SecurityContextHelper
java.lang.Object
org.openwms.web.flex.security.SecurityContextHelper
@Service(value="securityContextHelper")
public class SecurityContextHelper
- extends Object
A SecurityContextHelper. Has some helper methods around the SecurityContext.
- Since:
- 0.1
- Version:
- $Revision: 1409 $
- Author:
- Heiko Scherrer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SecurityContextHelper
public SecurityContextHelper()
getLoggedInUser
public final User getLoggedInUser()
- Helper method for rich clients to extract the current User from the
SecurityContext.
Therefore it is assumed that Spring Security's Authentication
object stores the current User
object as Principal. Whenever the
type of Principal does not match to our own User class, null
is returned.
- Returns:
- The User logged in, or
null
- See Also:
UserHolder
,
Authentication
checkCredentials
public final boolean checkCredentials(String username,
String password)
Copyright © 2005-2011 openwms.org. All Rights Reserved.