public FirebaseUserWrapper getUserByEmailAsync(String email) throws InterruptedException, ExecutionException{
UserRecord rec = defaultAuth.getUserByEmailAsync(email).get();
return (FirebaseUserWrapper) AbsObjectWrapper.ConvertToWrapper(new FirebaseAdminwrapper.FirebaseUserWrapper(), rec);
}
public FirebaseUserWrapper getUserByPhoneNumberAsync(String phoneNumber) throws InterruptedException, ExecutionException{
UserRecord rec = defaultAuth.getUserByPhoneNumberAsync(phoneNumber).get();
return (FirebaseUserWrapper) AbsObjectWrapper.ConvertToWrapper(new FirebaseAdminwrapper.FirebaseUserWrapper(), rec);
}
public String createCustomTokenAsync(String uid) throws InterruptedException, ExecutionException {
String token = defaultAuth.createCustomTokenAsync(uid).get();
return token;
}
public FirebaseUserWrapper createUser(String uid, String email, boolean emailVerified, String password, String phoneNo, String DisplayName, String PhotoUrl, boolean disabled) throws InterruptedException, ExecutionException {
CreateRequest request = new CreateRequest()
.setUid(uid)
.setEmail(email)
.setEmailVerified(emailVerified)
.setPassword(password)
.setPhoneNumber(phoneNo)
.setDisplayName(DisplayName)
.setPhotoUrl(PhotoUrl)
.setDisabled(disabled);
UserRecord rec = defaultAuth.createUserAsync(request).get();
return (FirebaseUserWrapper) AbsObjectWrapper.ConvertToWrapper(new FirebaseAdminwrapper.FirebaseUserWrapper(), rec);
}
public FirebaseUserWrapper getUserAsync(String uid) throws InterruptedException, ExecutionException{
UserRecord rec = defaultAuth.getUserAsync(uid).get();
return (FirebaseUserWrapper) AbsObjectWrapper.ConvertToWrapper(new FirebaseAdminwrapper.FirebaseUserWrapper(), rec);
}