1mod_auth(3) Erlang Module Definition mod_auth(3)
2
3
4
6 mod_auth - User authentication using text files, Dets, or Mnesia data‐
7 base.
8
10 This module provides for basic user authentication using textual files,
11 Dets databases, or Mnesia databases.
12
14 add_group_member(GroupName, UserName, Options) -> true | {error, Rea‐
15 son}
16 add_group_member(GroupName, UserName, Port, Dir) -> true | {error, Rea‐
17 son}
18 add_group_member(GroupName, UserName, Address, Port, Dir) -> true |
19 {error, Reason}
20
21 Types:
22
23 GroupName = string()
24 UserName = string()
25 Options = [Option]
26 Option = {port,Port} | {addr,Address} | {dir,Directory} |
27 {authPassword,AuthPassword}
28 Port = integer()
29 Address = {A,B,C,D} | string() | undefined
30 Dir = string()
31 AuthPassword = string()
32 Reason = term()
33
34 add_group_member/3, add_group_member/4, and add_group_member/5
35 each adds a user to a group. If the group does not exist, it is
36 created and the user is added to the group. Upon successful op‐
37 eration, this function returns true. When add_group_members/3 is
38 called, options Port and Dir are mandatory.
39
40 add_user(UserName, Options) -> true| {error, Reason}
41 add_user(UserName, Password, UserData, Port, Dir) -> true | {error,
42 Reason}
43 add_user(UserName, Password, UserData, Address, Port, Dir) -> true |
44 {error, Reason}
45
46 Types:
47
48 UserName = string()
49 Options = [Option]
50 Option = {password,Password} | {userData,UserData} |
51 {port,Port} | {addr,Address} | {dir,Directory} | {authPass‐
52 word,AuthPassword}
53 Password = string()
54 UserData = term()
55 Port = integer()
56 Address = {A,B,C,D} | string() | undefined
57 Dir = string()
58 AuthPassword =string()
59 Reason = term()
60
61 add_user/2, add_user/5, and add_user/6 each adds a user to the
62 user database. If the operation is successful, this function re‐
63 turns true. If an error occurs, {error,Reason} is returned. When
64 add_user/2 is called, options Password, UserData, Port, and Dir
65 are mandatory.
66
67 delete_group(GroupName, Options) -> true | {error,Reason}
68 <name>delete_group(GroupName, Port, Dir) -> true | {error, Reason}
69 delete_group(GroupName, Address, Port, Dir) -> true | {error, Reason}
70
71 Types:
72
73 Options = [Option]
74 Option = {port,Port} | {addr,Address} | {dir,Directory} |
75 {authPassword,AuthPassword}
76 Port = integer()
77 Address = {A,B,C,D} | string() | undefined
78 Dir = string()
79 GroupName = string()
80 AuthPassword = string()
81 Reason = term()
82
83 delete_group/2, delete_group/3, and delete_group/4 each deletes
84 the group specified and returns true. If there is an error, {er‐
85 ror, Reason} is returned. When delete_group/2 is called, option
86 Port and Dir are mandatory.
87
88 delete_group_member(GroupName, UserName, Options) -> true | {error,
89 Reason}
90 delete_group_member(GroupName, UserName, Port, Dir) -> true | {error,
91 Reason}
92 delete_group_member(GroupName, UserName, Address, Port, Dir) -> true |
93 {error, Reason}
94
95 Types:
96
97 GroupName = string()
98 UserName = string()
99 Options = [Option]
100 Option = {port,Port} | {addr,Address} | {dir,Directory} |
101 {authPassword,AuthPassword}
102 Port = integer()
103 Address = {A,B,C,D} | string() | undefined
104 Dir = string()
105 AuthPassword = string()
106 Reason = term()
107
108 delete_group_member/3, delete_group_member/4, and
109 delete_group_member/5 each deletes a user from a group. If the
110 group or the user does not exist, this function returns an er‐
111 ror, otherwise true. When delete_group_member/3 is called, the
112 options Port and Dir are mandatory.
113
114 delete_user(UserName,Options) -> true | {error, Reason}
115 delete_user(UserName, Port, Dir) -> true | {error, Reason}
116 delete_user(UserName, Address, Port, Dir) -> true | {error, Reason}
117
118 Types:
119
120 UserName = string()
121 Options = [Option]
122 Option = {port,Port} | {addr,Address} | {dir,Directory} |
123 {authPassword,AuthPassword}
124 Port = integer()
125 Address = {A,B,C,D} | string() | undefined
126 Dir = string()
127 AuthPassword = string()
128 Reason = term()
129
130 delete_user/2, delete_user/3, and delete_user/4 each deletes a
131 user from the user database. If the operation is successful,
132 this function returns true. If an error occurs, {error,Reason}
133 is returned. When delete_user/2 is called, options Port and Dir
134 are mandatory.
135
136 get_user(UserName,Options) -> {ok, #httpd_user} |{error, Reason}
137 get_user(UserName, Port, Dir) -> {ok, #httpd_user} | {error, Reason}
138 get_user(UserName, Address, Port, Dir) -> {ok, #httpd_user} | {error,
139 Reason}
140
141 Types:
142
143 UserName = string()
144 Options = [Option]
145 Option = {port,Port} | {addr,Address} | {dir,Directory} |
146 {authPassword,AuthPassword}
147 Port = integer()
148 Address = {A,B,C,D} | string() | undefined
149 Dir = string()
150 AuthPassword = string()
151 Reason = term()
152
153 get_user/2, get_user/3, and get_user/4 each returns an
154 httpd_user record containing the userdata for a specific user.
155 If the user cannot be found, {error, Reason} is returned. When
156 get_user/2 is called, options Port and Dir are mandatory.
157
158 list_groups(Options) -> {ok, Groups} | {error, Reason}
159 list_groups(Port, Dir) -> {ok, Groups} | {error, Reason}
160 list_groups(Address, Port, Dir) -> {ok, Groups} | {error, Reason}
161
162 Types:
163
164 Options = [Option]
165 Option = {port,Port} | {addr,Address} | {dir,Directory} |
166 {authPassword,AuthPassword}
167 Port = integer()
168 Address = {A,B,C,D} | string() | undefined
169 Dir = string()
170 Groups = list()
171 AuthPassword = string()
172 Reason = term()
173
174 list_groups/1, list_groups/2, and list_groups/3 each lists all
175 the groups available. If there is an error, {error, Reason} is
176 returned. When list_groups/1 is called, options Port and Dir are
177 mandatory.
178
179 list_group_members(GroupName, Options) -> {ok, Users} | {error, Reason}
180 list_group_members(GroupName, Port, Dir) -> {ok, Users} | {error, Rea‐
181 son}
182 list_group_members(GroupName, Address, Port, Dir) -> {ok, Users} | {er‐
183 ror, Reason}
184
185 Types:
186
187 GroupName = string()
188 Options = [Option]
189 Option = {port,Port} | {addr,Address} | {dir,Directory} |
190 {authPassword,AuthPassword}
191 Port = integer()
192 Address = {A,B,C,D} | string() | undefined
193 Dir = string()
194 Users = list()
195 AuthPassword = string()
196 Reason = term()
197
198 list_group_members/2, list_group_members/3, and list_group_mem‐
199 bers/4 each lists the members of a specified group. If the group
200 does not exist or there is an error, {error, Reason} is re‐
201 turned. When list_group_members/2 is called, options Port and
202 Dir are mandatory.
203
204 list_users(Options) -> {ok, Users} | {error, Reason}
205 list_users(Port, Dir) -> {ok, Users} | {error, Reason}
206 list_users(Address, Port, Dir) -> {ok, Users} | {error, Reason}
207
208 Types:
209
210 Options = [Option]
211 Option = {port,Port} | {addr,Address} | {dir,Directory} |
212 {authPassword,AuthPassword}
213 Port = integer()
214 Address = {A,B,C,D} | string() | undefined
215 Dir = string()
216 Users = list()
217 AuthPassword = string()
218 Reason = atom()
219
220 list_users/1, list_users/2, and list_users/3 each returns a list
221 of users in the user database for a specific Port/Dir. When
222 list_users/1 is called, options Port and Dir are mandatory.
223
224 update_password(Port, Dir, OldPassword, NewPassword, NewPassword) -> ok
225 | {error, Reason}
226 update_password(Address,Port, Dir, OldPassword, NewPassword, NewPass‐
227 word) -> ok | {error, Reason}
228
229 Types:
230
231 Port = integer()
232 Address = {A,B,C,D} | string() | undefined
233 Dir = string()
234 GroupName = string()
235 OldPassword = string()
236 NewPassword = string()
237 Reason = term()
238
239 update_password/5 and update_password/6 each updates AuthAccess‐
240 Password for the specified directory. If NewPassword is equal to
241 "NoPassword", no password is required to change authorisation
242 data. If NewPassword is equal to "DummyPassword", no changes can
243 be done without changing the password first.
244
246 httpd(3), mod_alias(3)
247
248
249
250Ericsson AB inets 8.3.1.2 mod_auth(3)