User's Guide
Reference Manual
Release Notes
PDF
Top

inets
Reference Manual
Version 5.9

Expand All
Contract All

Table of Contents

- inets
  - Top of manual page
  - services/0
  - services_info/0
  - service_names/0
  - start/0
  - start/1
  - stop/0
  - start/2
  - start/3
  - stop/2
- ftp
  - Top of manual page
  - account/2
  - append/2
  - append/3
  - append_bin/3
  - append_chunk/2
  - append_chunk_start/2
  - append_chunk_end/1
  - cd/2
  - close/1
  - delete/2
  - formaterror/1
  - lcd/2
  - lpwd/1
  - ls/1
  - ls/2
  - mkdir/2
  - nlist/1
  - nlist/2
  - open/1
  - open/2
  - pwd/1
  - pwd/1
  - recv/2
  - recv/3
  - recv_bin/2
  - recv_chunk_start/2
  - recv_chunk/1
  - rename/3
  - rmdir/2
  - send/2
  - send/3
  - send_bin/3
  - send_chunk/2
  - send_chunk_start/2
  - send_chunk_end/1
  - type/2
  - user/3
  - user/4
  - quote/2
- tftp
  - Top of manual page
  - start/1
  - read_file/3
  - write_file/3
  - info/1
  - info/1
  - info/1
  - change_config/2
  - change_config/2
  - change_config/2
  - start/0
  - prepare/6
  - open/6
  - read/1
  - write/2
  - abort/3
  - error_msg/2
  - warning_msg/2
  - info_msg/2
- httpc
  - Top of manual page
  - request/1
  - request/2
  - request/4
  - request/5
  - cancel_request/1
  - cancel_request/2
  - set_options/1
  - set_options/2
  - get_options/1
  - get_options/2
  - stream_next/1
  - store_cookies/2
  - store_cookies/3
  - cookie_header/1
  - cookie_header/2
  - cookie_header/3
  - reset_cookies/0
  - reset_cookies/1
  - which_cookies/0
  - which_cookies/1
- httpd
  - Top of manual page
  - info/1
  - info/2
  - info/2
  - info/3
  - reload_config/2
  - Module:do/1
  - Module:load/2
  - Module:store/2
  - Module:remove/1
  - parse_query/1
- httpd_conf
  - Top of manual page
  - check_enum/2
  - clean/1
  - custom_clean/3
  - is_directory/1
  - is_file/1
  - make_integer/1
- httpd_socket
  - Top of manual page
  - deliver/3
  - peername/2
  - resolve/0
- httpd_util
  - Top of manual page
  - convert_request_date/1
  - create_etag/1
  - decode_hex/1
  - day/1
  - flatlength/1
  - hexlist_to_integer/1
  - integer_to_hexlist/1
  - lookup/2
  - lookup/3
  - lookup_mime/2
  - lookup_mime/3
  - lookup_mime_default/2
  - lookup_mime_default/3
  - message/3
  - month/1
  - multi_lookup/2
  - reason_phrase/1
  - rfc1123_date/0
  - rfc1123_date/2
  - split/3
  - split_script_path/1
  - split_path/1
  - strip/1
  - suffix/1
- mod_alias
  - Top of manual page
  - default_index/2
  - path/3
  - real_name/3
  - real_script_name/3
- mod_auth
  - Top of manual page
  - add_user/2
  - add_user/5
  - add_user/6
  - delete_user/2
  - delete_user/3
  - delete_user/4
  - get_user/2
  - get_user/3
  - get_user/4
  - list_users/1
  - list_users/2
  - list_users/3
  - add_group_member/3
  - add_group_member/4
  - add_group_member/5
  - delete_group_member/3
  - delete_group_member/4
  - delete_group_member/5
  - list_group_members/2
  - list_group_members/3
  - list_group_members/4
  - list_groups/1
  - list_groups/2
  - list_groups/3
  - delete_group/2
  - delete_group/4
  - update_password/5
  - update_password/6
- mod_esi
  - Top of manual page
  - deliver/2
  - Module:Function/3
  - Module:Function/2
- mod_security
  - Top of manual page
  - list_auth_users/1
  - list_auth_users/2
  - list_auth_users/2
  - list_auth_users/3
  - list_blocked_users/1
  - list_blocked_users/2
  - list_blocked_users/2
  - list_blocked_users/3
  - block_user/4
  - block_user/5
  - unblock_user/2
  - unblock_user/3
  - unblock_user/3
  - unblock_user/4
  - event/4
  - event/5
- http_uri
  - Top of manual page
  - scheme_defaults/0
  - parse/1
  - parse/2
  - encode/1
  - decode/1

# mod_auth

### MODULE

mod_auth

### MODULE SUMMARY

User authentication using text files, dets or mnesia database.

### DESCRIPTION

This module provides for basic user authentication using textual files, dets databases as well as mnesia databases.

### EXPORTS

add_user(UserName, Options) -> true| {error, Reason}
add_user(UserName, Password, UserData, Port, Dir) -> true | {error, Reason}
add_user(UserName, Password, UserData, Address, Port, Dir) -> true | {error, Reason}

Types:

UserName = string()
Options = [Option]
Option = {password,Password} | {userData,UserData} | {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Password = string()
UserData = term()
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
AuthPassword =string()
Reason = term()

add_user/2, add_user/5 and add_user/6 adds a user to the user database. If the operation is successful, this function returns true. If an error occurs, {error,Reason} is returned. When add_user/2 is called the Password, UserData Port and Dir options is mandatory.

delete_user(UserName,Options) -> true | {error, Reason}
delete_user(UserName, Port, Dir) -> true | {error, Reason}
delete_user(UserName, Address, Port, Dir) -> true | {error, Reason}

Types:

UserName = string()
Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
AuthPassword = string()
Reason = term()

delete_user/2, delete_user/3 and delete_user/4 deletes a user from the user database. If the operation is successful, this function returns true. If an error occurs, {error,Reason} is returned. When delete_user/2 is called the Port and Dir options are mandatory.

get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason}
get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason}
get_user(UserName, Address, Port, Dir) -> {ok, #httpd_user} | {error, Reason}

Types:

UserName = string()
Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
AuthPassword = string()
Reason = term()

get_user/2, get_user/3 and get_user/4 returns a httpd_user record containing the userdata for a specific user. If the user cannot be found, {error, Reason} is returned. When get_user/2 is called the Port and Dir options are mandatory.

list_users(Options) -> {ok, Users} | {error, Reason}
list_users(Port, Dir) -> {ok, Users} | {error, Reason}
list_users(Address, Port, Dir) -> {ok, Users} | {error, Reason}

Types:

Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Users = list()
AuthPassword = string()
Reason = atom()

list_users/1, list_users/2 and list_users/3 returns a list of users in the user database for a specific Port/Dir. When list_users/1 is called the Port and Dir options are mandatory.

add_group_member(GroupName, UserName, Options) -> true | {error, Reason}
add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}
add_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason}

Types:

GroupName = string()
UserName = string()
Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
AuthPassword = string()
Reason = term()

add_group_member/3, add_group_member/4 and add_group_member/5 adds a user to a group. If the group does not exist, it is created and the user is added to the group. Upon successful operation, this function returns true. When add_group_members/3 is called the Port and Dir options are mandatory.

delete_group_member(GroupName, UserName, Options) -> true | {error, Reason}
delete_group_member(GroupName, UserName, Port, Dir) -> true | {error, Reason}
delete_group_member(GroupName, UserName, Address, Port, Dir) -> true | {error, Reason}

Types:

GroupName = string()
UserName = string()
Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
AuthPassword = string()
Reason = term()

delete_group_member/3, delete_group_member/4 and delete_group_member/5 deletes a user from a group. If the group or the user does not exist, this function returns an error, otherwise it returns true. When delete_group_member/3 is called the Port and Dir options are mandatory.

list_group_members(GroupName, Options) -> {ok, Users} | {error, Reason}
list_group_members(GroupName, Port, Dir) -> {ok, Users} | {error, Reason}
list_group_members(GroupName, Address, Port, Dir) -> {ok, Users} | {error, Reason}

Types:

GroupName = string()
Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Users = list()
AuthPassword = string()
Reason = term()

list_group_members/2, list_group_members/3 and list_group_members/4 lists the members of a specified group. If the group does not exist or there is an error, {error, Reason} is returned. When list_group_members/2 is called the Port and Dir options are mandatory.

list_groups(Options) -> {ok, Groups} | {error, Reason}
list_groups(Port, Dir) -> {ok, Groups} | {error, Reason}
list_groups(Address, Port, Dir) -> {ok, Groups} | {error, Reason}

Types:

Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
Groups = list()
AuthPassword = string()
Reason = term()

list_groups/1, list_groups/2 and list_groups/3 lists all the groups available. If there is an error, {error, Reason} is returned. When list_groups/1 is called the Port and Dir options are mandatory.

delete_group(GroupName, Options) -> true | {error,Reason} <name>delete_group(GroupName, Port, Dir) -> true | {error, Reason}
delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason}

Types:

Options = [Option]
Option = {port,Port} | {addr,Address} | {dir,Directory} | {authPassword,AuthPassword}
Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
GroupName = string()
AuthPassword = string()
Reason = term()

delete_group/2, delete_group/3 and delete_group/4 deletes the group specified and returns true. If there is an error, {error, Reason} is returned. When delete_group/2 is called the Port and Dir options are mandatory.

update_password(Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason}
update_password(Address,Port, Dir, OldPassword, NewPassword, NewPassword) -> ok | {error, Reason}

Types:

Port = integer()
Address = {A,B,C,D} | string() | undefined
Dir = string()
GroupName = string()
OldPassword = string()
NewPassword = string()
Reason = term()

update_password/5 and update_password/6 Updates the AuthAccessPassword for the specified directory. If NewPassword is equal to "NoPassword" no password is requires to change authorisation data. If NewPassword is equal to "DummyPassword" no changes can be done without changing the password first.

### SEE ALSO

httpd(3), mod_alias(3),