Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/server/auth/plain/Authenticator.java @ 5933:1b939742629e
Pass LoginServlet's ServletContext to the Authenticators.
When implementing SAML validation we need a way to configure a trusted
key, and passing the ServletContext seems to be about the simplest way
to do this.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Wed, 08 May 2013 17:56:13 +0200 |
parents | 172338b1407f |
children | ea9eef426962 |
comparison
equal
deleted
inserted
replaced
5932:c7951390fd58 | 5933:1b939742629e |
---|---|
17 import java.io.FileReader; | 17 import java.io.FileReader; |
18 import java.io.IOException; | 18 import java.io.IOException; |
19 | 19 |
20 import java.util.ArrayList; | 20 import java.util.ArrayList; |
21 import java.util.List; | 21 import java.util.List; |
22 | |
23 import javax.servlet.ServletContext; | |
22 | 24 |
23 import org.apache.log4j.Logger; | 25 import org.apache.log4j.Logger; |
24 | 26 |
25 import org.dive4elements.river.client.server.features.Features; | 27 import org.dive4elements.river.client.server.features.Features; |
26 | 28 |
86 @Override | 88 @Override |
87 public org.dive4elements.river.client.server.auth.Authentication auth( | 89 public org.dive4elements.river.client.server.auth.Authentication auth( |
88 String username, | 90 String username, |
89 String password, | 91 String password, |
90 String encoding, | 92 String encoding, |
91 Features features | 93 Features features, |
94 ServletContext context | |
92 ) | 95 ) |
93 throws AuthenticationException, IOException | 96 throws AuthenticationException, IOException |
94 { | 97 { |
95 File file = credentialsFile(); | 98 File file = credentialsFile(); |
96 if (!file.canRead() || !file.isFile()) { | 99 if (!file.canRead() || !file.isFile()) { |