added function basic_authentication

Signed-off-by: abbr <wenfred@gmail.com>