
|
If you were logged in you would be able to see more operations.
|
|
|
|
I've been experiencing some very strange issues with the spring security integration. I suspect its due to synchronization problems either within spring-flex, spring-mvc or tomcat on session handling level.
The issue occurs for the following use case:
1) call ChannelSet.login() with valid user credentials
2) within the callback provided to login(), call a remote object that will return granted authorities and other details for the just logged in user
3) validate the the requested user details were provided through the remote object call
Unfortunately step 3 will fail in most (but not all cases), because SecurityContextHolder.getContext().getAuthentication() will return null as for Authentication. This happens although login was called successfully.
var token:AsyncToken = _channelSet.login(user, password);
token.addResponder(new AsyncResponder(function(result:Object, token:Object):void {
service.whoami(); <--- SecurityContext.getAuthentication() will still return null at this point
}, function(result:Object, token:Object):void {
trace("Login failed");
}));
I've attached a minimal flex builder project for this case that should allow you to confirm this issue. The libraries are consistent with the latest test-drive project.
|
|
Description
|
I've been experiencing some very strange issues with the spring security integration. I suspect its due to synchronization problems either within spring-flex, spring-mvc or tomcat on session handling level.
The issue occurs for the following use case:
1) call ChannelSet.login() with valid user credentials
2) within the callback provided to login(), call a remote object that will return granted authorities and other details for the just logged in user
3) validate the the requested user details were provided through the remote object call
Unfortunately step 3 will fail in most (but not all cases), because SecurityContextHolder.getContext().getAuthentication() will return null as for Authentication. This happens although login was called successfully.
var token:AsyncToken = _channelSet.login(user, password);
token.addResponder(new AsyncResponder(function(result:Object, token:Object):void {
service.whoami(); <--- SecurityContext.getAuthentication() will still return null at this point
}, function(result:Object, token:Object):void {
trace("Login failed");
}));
I've attached a minimal flex builder project for this case that should allow you to confirm this issue. The libraries are consistent with the latest test-drive project.
|
Show » |
Sort Order:
made changes - 08/May/09 02:41 PM
| Field |
Original Value |
New Value |
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|
Fix Version/s
|
|
1.0.0.RC1
[ 11168
]
|
|
Resolution
|
|
Cannot Reproduce
[ 5
]
|
made changes - 11/May/09 11:55 AM
|
Attachment
|
|
main.swf
[ 15380
]
|
|
Attachment
|
|
build.xml
[ 15379
]
|
|