01: /** CRAuthDisplayMngr is a class that knows how to display various parts of
02: * the authentication system. This is a customized version of
03: * AuthDisplaMngr that works with the CRAuthenticator. It knows how to
04: * handle the challenge screen.
05: *
06: * $Id: CRAuthDisplayMngr.java,v 1.1.1.1 2002/10/02 18:42:55 wastl Exp $
07: *
08: * @author Devin Kowatch
09: * @version $Revision: 1.1.1.1 $
10: * @see org.webengruven.webmail.auth.AuthDisplayMngr
11: *
12: * Copyright (C) 2000 Devin Kowatch
13: */package org.webengruven.webmail.auth;
14:
15: import net.wastl.webmail.server.*;
16: import net.wastl.webmail.xml.*;
17: import net.wastl.webmail.exceptions.*;
18:
19: public class CRAuthDisplayMngr extends AuthDisplayMngr {
20:
21: /** Default C'tor. This c'tor isn't very useful, so don't use it. */
22: public CRAuthDisplayMngr() {
23: }
24:
25: /** Construct with a ref to the constructing authenticator. This class
26: * needs to get info from the authenticator which created it, so a
27: * refrence to that authenticator is needed.
28: * @param a The CRAuthenticator which this is tied to.
29: */
30: public CRAuthDisplayMngr(CRAuthenticator a) {
31: auth = a;
32: }
33:
34: /** Set up some variables for the challenge screen.
35: * @param ud User data for the user trying to authenticate.
36: * @param model The model to set vars in.
37: */
38: public void setChallengeScreenVars(UserData ud,
39: XMLGenericModel model) throws WebMailException {
40: String chal = auth.getChallenge(ud);
41: model.setStateVar("challenge", chal);
42: }
43:
44: /** Get the filename of the challenge screen.
45: * @return The filename of the challenge screen
46: */
47: public String getChallengeScreenFile() {
48: return "challenge.xsl";
49: }
50:
51: /** Tell the loginscreen not to use a password prompt. */
52: public void setLoginScreenVars(XMLGenericModel model)
53: throws WebMailException {
54: model.setStateVar("pass prompt", "0");
55: model.setStateVar("action uri", "challenge");
56: }
57:
58: protected CRAuthenticator auth;
59:
60: } // END class CRAuthDisplayMngr
|