comparison gwt-client/src/main/java/org/dive4elements/river/client/server/LoginServlet.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 24dc13ac8e6c
comparison
equal deleted inserted replaced
5932:c7951390fd58 5933:1b939742629e
121 { 121 {
122 ServletContext sc = this.getServletContext(); 122 ServletContext sc = this.getServletContext();
123 Features features = (Features)sc.getAttribute(Features.CONTEXT_ATTRIBUTE); 123 Features features = (Features)sc.getAttribute(Features.CONTEXT_ATTRIBUTE);
124 String auth = sc.getInitParameter("authentication"); 124 String auth = sc.getInitParameter("authentication");
125 return AuthenticationFactory.getInstance(auth).auth(username, password, 125 return AuthenticationFactory.getInstance(auth).auth(username, password,
126 encoding, features); 126 encoding, features, sc);
127 } 127 }
128 } 128 }

http://dive4elements.wald.intevation.org