Package com.warrenstrange.googleauth
Interface ICredentialRepository
public interface ICredentialRepository
- Author:
- Enrico M. Crisosotomo
-
Method Summary
Modifier and Type Method Description StringgetSecretKey(String userName)This method retrieves the Base32-encoded private key of the given user.voidsaveUserCredentials(String userName, String secretKey, int validationCode, List<Integer> scratchCodes)This method saves the user credentials.
-
Method Details
-
getSecretKey
This method retrieves the Base32-encoded private key of the given user.- Parameters:
userName- the user whose private key shall be retrieved.- Returns:
- the private key of the specified user.
-
saveUserCredentials
void saveUserCredentials(String userName, String secretKey, int validationCode, List<Integer> scratchCodes)This method saves the user credentials.- Parameters:
userName- the user whose data shall be saved.secretKey- the generated key.validationCode- the validation code.scratchCodes- the list of scratch codes.
-