org.springframework.flex.security
Class AuthenticationResultUtils
java.lang.Object
org.springframework.flex.security.AuthenticationResultUtils
public abstract class AuthenticationResultUtils
- extends java.lang.Object
Helper that ensures consistent handling of a Spring Security Authentication
, providing translation to a structure that will be
useful to a Flex client in determining the credentials of an authenticated user.
When this helper is used to convert the Authentication
into a BlazeDS message, the body of the returned
message will contain the following properties as obtained from the Authentication
object:
- name - the "name" property from the authentication
- authorities - an array of String representations of the authentication's authorities (i.e. obtained through
GrantedAuthority.getAuthority()
)
- Author:
- Jeremy Grelle
Method Summary |
static java.util.Map<java.lang.String,java.lang.Object> |
getAuthenticationResult()
Checks for an Authentication object in the current SecurityContext and if one is found, constructs and returns
a map that will result in an object of the expected format when returned to the Flex client. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AuthenticationResultUtils
public AuthenticationResultUtils()
getAuthenticationResult
public static java.util.Map<java.lang.String,java.lang.Object> getAuthenticationResult()
- Checks for an
Authentication
object in the current SecurityContext
and if one is found, constructs and returns
a map that will result in an object of the expected format when returned to the Flex client.
- Returns:
- a map of the
Authentication
properties to be serialized over AMF, or null if no Authentication is found