R/oh.user.auth.R

Defines functions oh.user.auth

Documented in oh.user.auth

#' Retrieve hashed passwd for a user
#' @param user username
#' @param password passwd
#' @param ... other argus
#' @return pw hash
#' @export
oh.user.auth <- function(user, password, ...){
	#when using oh.login, argument 'serverurl' is part of the ... ellipse
	xhr <- oh.call("/user/auth", user=user, password=password, ...);
	
	#check response
	if(xhr$result == "success"){
		message("Hashed password retrieved.");
		return(xhr[["hashed_password"]]);
	} 
	return(xhr);
}
jeroenooms/Ohmage documentation built on May 19, 2019, 6:11 a.m.