@Service public class RecoveryServiceImpl extends Object implements RecoveryService
| Constructor and Description |
|---|
RecoveryServiceImpl(DataService dataService,
UserService userService,
RecoveryCodeFactory recoveryCodeFactory,
IdGenerator idGenerator) |
| Modifier and Type | Method and Description |
|---|---|
Stream<RecoveryCode> |
generateRecoveryCodes()
Generates new recovery codes for the current user and deletes the old codes (if any).
|
Stream<RecoveryCode> |
getRecoveryCodes()
Get the recovery codes (if any) of the current user.
|
void |
useRecoveryCode(String recoveryCode)
Checks if a recovery code is valid for the current user and throws an exception if it is not.
|
public RecoveryServiceImpl(DataService dataService, UserService userService, RecoveryCodeFactory recoveryCodeFactory, IdGenerator idGenerator)
@Transactional public Stream<RecoveryCode> generateRecoveryCodes()
RecoveryServicegenerateRecoveryCodes in interface RecoveryService@Transactional public void useRecoveryCode(String recoveryCode)
RecoveryServiceuseRecoveryCode in interface RecoveryServicerecoveryCode - the code to validatepublic Stream<RecoveryCode> getRecoveryCodes()
RecoveryServicegetRecoveryCodes in interface RecoveryServiceCopyright © 2018 Pivotal Software, Inc.. All rights reserved.