comparison flys-client/src/main/java/de/intevation/flys/client/server/auth/was/Response.java @ 2978:98514ab2c9ba

Implement getting a list of roles from a logged in user flys-client/trunk@4975 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Bjoern Ricks <bjoern.ricks@intevation.de>
date Fri, 13 Jul 2012 09:27:53 +0000
parents 3e0567e02577
children d700f6492386
comparison
equal deleted inserted replaced
2977:5161e25392ea 2978:98514ab2c9ba
1 package de.intevation.flys.client.server.auth.was; 1 package de.intevation.flys.client.server.auth.was;
2 2
3 import java.io.IOException; 3 import java.io.IOException;
4 import java.io.InputStream; 4 import java.io.InputStream;
5 import java.util.ArrayList;
6 import java.util.List;
5 7
6 import org.apache.commons.codec.binary.Base64InputStream; 8 import org.apache.commons.codec.binary.Base64InputStream;
7 9
8 import org.apache.http.HttpEntity; 10 import org.apache.http.HttpEntity;
9 11
100 public User getUser() throws AuthenticationException { 102 public User getUser() throws AuthenticationException {
101 Assertion assertion = this.getAssertion(); 103 Assertion assertion = this.getAssertion();
102 if (assertion == null) { 104 if (assertion == null) {
103 throw new AuthenticationException("Response doesn't contain an assertion"); 105 throw new AuthenticationException("Response doesn't contain an assertion");
104 } 106 }
105 return new User(this.username, this.password, assertion); 107 return new User(this.username, this.password, this.assertion.getRoles(), assertion);
106 } 108 }
107 } 109 }
108 // vim: set si et fileencoding=utf-8 ts=4 sw=4 tw=80: 110 // vim: set si et fileencoding=utf-8 ts=4 sw=4 tw=80:

http://dive4elements.wald.intevation.org