Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/auth/was/Authenticator.java @ 3485:71ba3cf3ec5e
Refactor Authentication to allow to pass the Freatures to the user class
The Features class can be used to receive the allowed features for the users
roles.
flys-client/trunk@5183 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Fri, 10 Aug 2012 07:06:18 +0000 |
parents | d7f76f197d89 |
children | 23095983c249 |
comparison
equal
deleted
inserted
replaced
3484:83845aa322ea | 3485:71ba3cf3ec5e |
---|---|
11 import org.apache.http.impl.client.DefaultHttpClient; | 11 import org.apache.http.impl.client.DefaultHttpClient; |
12 | 12 |
13 import de.intevation.flys.client.server.GGInATrustStrategy; | 13 import de.intevation.flys.client.server.GGInATrustStrategy; |
14 import de.intevation.flys.client.server.auth.Authentication; | 14 import de.intevation.flys.client.server.auth.Authentication; |
15 import de.intevation.flys.client.server.auth.AuthenticationException; | 15 import de.intevation.flys.client.server.auth.AuthenticationException; |
16 import de.intevation.flys.client.server.features.Features; | |
16 | 17 |
17 public class Authenticator implements de.intevation.flys.client.server.auth.Authenticator { | 18 public class Authenticator implements de.intevation.flys.client.server.auth.Authenticator { |
18 | 19 |
19 public Authentication auth(String username, String password, String encoding) | 20 @Override |
21 public Authentication auth(String username, String password, String encoding, Features faetures) | |
20 throws AuthenticationException, IOException { | 22 throws AuthenticationException, IOException { |
21 try { | 23 try { |
22 SSLSocketFactory sf = new SSLSocketFactory( | 24 SSLSocketFactory sf = new SSLSocketFactory( |
23 new GGInATrustStrategy()); | 25 new GGInATrustStrategy()); |
24 Scheme https = new Scheme("https", 443, sf); | 26 Scheme https = new Scheme("https", 443, sf); |