I still have problem in integration with LoginModule and EJBs.
What i've done is this:
1. Created a class implementing LoginModule with inside the reference of
my @Stateless EJB
The JAAS customization works fine, i can simply access the LoginModule's
methods, but my EJB is not initialized.
public class JAASLoginModule implements LoginModule {
@EJB
private UserService userService;
/* method implementation ...*/
}
2. Defined the handler to catch the login
public class JAASCallbackHandler implements CallbackHandler {
@Override
public void handle(Callback[] callbacks) throws IOException,
UnsupportedCallbackException {
/* implementations */
}
}
3. Defined some custom Principals to match with my "logic" roles (i'd
like to load roles from DB for each user)
Am i missing something? Or it is simply a wrong approach?
Piercarlo Alberto Beghetto
Developer @ Diennea - MagNews
Tel.: (+39) 0546 667432 - Int. 967
Viale G.Marconi 30/14 - 48018 Faenza (RA)
[cid:[email protected]]<http://www.magnews.it/it>
[cid:[email protected]]<http://www.linkedin.com/company/diennea---magnews>
[cid:[email protected]] <http://twitter.com/DienneaMagNews>
[cid:[email protected]]
<http://www.facebook.com/pages/MagNews/197617841797>
[cid:[email protected]]
<http://www.magnews.it/it/iscriviti-alla-newsletter>
________________________________
Rimani aggiornato sul mondo dell'email marketing e del digital marketing:
visita il nostro blog! http://blog.magnews.it