Package usecase.auth
Class AuthenticationService
- java.lang.Object
-
- usecase.auth.AuthenticationService
-
- All Implemented Interfaces:
Serializable
@SessionScoped public class AuthenticationService extends Object implements Serializable
Classe che fornisce i servizi relativi all'autenticazione.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAuthenticationService()protectedAuthenticationService(GenericRepository genericRepository, Pbkdf2PasswordHash passwordHash)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticate(String username, String password)Autentica un utenteCurrentUsergetCurrentUser()Ritorna l'utente in uso e ne rende accessibile i dati nelle jsp
-
-
-
Constructor Detail
-
AuthenticationService
protected AuthenticationService()
-
AuthenticationService
@Inject protected AuthenticationService(GenericRepository genericRepository, Pbkdf2PasswordHash passwordHash)
-
-
Method Detail
-
authenticate
public boolean authenticate(String username, String password)
Autentica un utente- Parameters:
username- stringa con nome utentepassword- stringa con password- Returns:
- esito dell'operazione
-
getCurrentUser
@Named("currentUser") @RequestScoped @Produces public CurrentUser getCurrentUser()
Ritorna l'utente in uso e ne rende accessibile i dati nelle jsp- Returns:
- utente in uso
-
-