SimpleCallbackHandler Jdev obsolete 11.1.1.4 - what to use

Jedv 11.1.1.4

Hello
I'm 'migration' our application Jdev 11.1.1.2 11.1.1.4
The application uses a jspx login page and a bean of connection as described in the Fusion Middleware Developer's guide.

I just compiled the application, and I get a warning saying that SimpleCallbackHandler is obsolete.
I checked the online help of the bean connection (http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/adding_security.htm#BABDEICH)
and the code example always use SimpleCallbackHandler:
1 public String doLogin() {
2   String un = _username;
3   byte[] pw = _password.getBytes();
4   FacesContext ctx = FacesContext.getCurrentInstance();
5   HttpServletRequest request =
6     (HttpServletRequest)ctx.getExternalContext().getRequest();
7   CallbackHandler handler = new SimpleCallbackHandler(un, pw);
8   try {
9     Subject mySubject = Authentication.login(handler);
10     ServletAuthentication.runAs(mySubject, request);
11     ServletAuthentication.generateNewSessionID(request);
12     String loginUrl = "/adfAuthentication?success_url=/faces" + 
13       ctx.getViewRoot().getViewId();
14     HttpServletResponse response = 
15       (HttpServletResponse)ctx.getExternalContext().getResponse();
16     sendForward(request, response, loginUrl);
17   } catch (FailedLoginException fle) {
18     FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_ERROR,
19                                        "Incorrect Username or Password",
20                                        "An incorrect Username or Password" +
21                                        " was specified");
22     ctx.addMessage(null, msg);
23   } catch (LoginException le) {
24     reportUnexpectedLoginError("LoginException", le);
25   }
26   return null;
27 }
What are we supposed to use instead of SimpleCallBackHandler?

Thanks in advance
Paul

Andrejus Baranovsky has a blog about this entry...

http://andrejusb.blogspot.com/2010/11/things-you-must-know-about-ADF-faces.html

Timo

Tags: Java

Similar Questions

Maybe you are looking for