summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Campo2008-03-14 06:56:23 (EDT)
committerChristian Campo2008-03-14 06:56:23 (EDT)
commit59aac9c199d2d259dc84dbfaa427f5c4677c0f1a (patch)
tree7a77c160dcce5776d75b8ed622d1d175ddf6a066
parent43d153db6db53b1c7caed97b78018567b1cba54e (diff)
downloadorg.eclipse.riena-59aac9c199d2d259dc84dbfaa427f5c4677c0f1a.zip
org.eclipse.riena-59aac9c199d2d259dc84dbfaa427f5c4677c0f1a.tar.gz
org.eclipse.riena-59aac9c199d2d259dc84dbfaa427f5c4677c0f1a.tar.bz2
setting SubjectHolder correctly after successful login
-rw-r--r--org.eclipse.riena.security.common/src/org/eclipse/riena/security/common/authentication/ClientLogin.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/org.eclipse.riena.security.common/src/org/eclipse/riena/security/common/authentication/ClientLogin.java b/org.eclipse.riena.security.common/src/org/eclipse/riena/security/common/authentication/ClientLogin.java
index 6f509e0..a8fc21f 100644
--- a/org.eclipse.riena.security.common/src/org/eclipse/riena/security/common/authentication/ClientLogin.java
+++ b/org.eclipse.riena.security.common/src/org/eclipse/riena/security/common/authentication/ClientLogin.java
@@ -68,6 +68,11 @@ public class ClientLogin {
throw new AuthenticationFailure("no authentication service");
}
ticket = authenticationService.login(loginContext, creds);
+ subject = new Subject();
+ for (Principal principal : ticket.getPrincipals()) {
+ subject.getPrincipals().add(principal);
+ }
+ subjectHolderService.fetchSubjectHolder().setSubject(subject);
return true;
} catch (AuthenticationFailure failure) {
throw new LoginException(failure.getMessage());