View Source mod_auth (inets v9.2)

User authentication using text files, Dets, or Mnesia database.

This module provides for basic user authentication using textual files, Dets databases, or Mnesia databases.

SEE ALSO

httpd, mod_alias

Summary

Functions

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

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

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

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

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

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

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

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

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

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

Functions

Link to this function

add_group_member(GroupName, UserName, Opt)

View Source

Equivalent to add_group_member/5

Link to this function

add_group_member(GroupName, UserName, Port, Dir)

View Source

Equivalent to add_group_member/5

Link to this function

add_group_member(GroupName, UserName, Addr, Port, Dir)

View Source

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

add_group_member/3, add_group_member/4, and add_group_member/5 each 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, options Port and Dir are mandatory.

Equivalent to add_user/6

Link to this function

add_user(UserName, Password, UserData, Port, Dir)

View Source

Equivalent to add_user/6

Link to this function

add_user(UserName, Password, UserData, Addr, Port, Dir)

View Source

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

add_user/2, add_user/5, and add_user/6 each 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, options Password, UserData, Port, and Dir are mandatory.

Link to this function

delete_group(GroupName, Opt)

View Source

Equivalent to delete_group/4

Link to this function

delete_group(GroupName, Addr, Port, Dir)

View Source

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

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

Link to this function

delete_group_member(GroupName, UserName, Opt)

View Source

Equivalent to delete_group_member/5

Link to this function

delete_group_member(GroupName, UserName, Port, Dir)

View Source

Equivalent to delete_group_member/5

Link to this function

delete_group_member(GroupName, UserName, Addr, Port, Dir)

View Source

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

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

Link to this function

delete_user(UserName, Opt)

View Source

Equivalent to delete_user/4

Link to this function

delete_user(UserName, Port, Dir)

View Source

Equivalent to delete_user/4

Link to this function

delete_user(UserName, Addr, Port, Dir)

View Source

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

delete_user/2, delete_user/3, and delete_user/4 each 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, options Port and Dir are mandatory.

Equivalent to get_user/4

Link to this function

get_user(UserName, Port, Dir)

View Source

Equivalent to get_user/4

Link to this function

get_user(UserName, Addr, Port, Dir)

View Source

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

get_user/2, get_user/3, and get_user/4 each returns an 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, options Port and Dir are mandatory.

Link to this function

list_group_members(GroupName, Opt)

View Source

Equivalent to list_group_members/4

Link to this function

list_group_members(GroupName, Port, Dir)

View Source

Equivalent to list_group_members/4

Link to this function

list_group_members(GroupName, Addr, Port, Dir)

View Source

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

list_group_members/2, list_group_members/3, and list_group_members/4 each 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, options Port and Dir are mandatory.

Equivalent to list_groups/3

Equivalent to list_groups/3

Link to this function

list_groups(Addr, Port, Dir)

View Source

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

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

Link to this function

list_users(Opt)

View Source (since OTP R14B01)

Equivalent to list_users/3

Link to this function

list_users(Port, Dir)

View Source (since OTP R14B01)

Equivalent to list_users/3

Link to this function

list_users(Addr, Port, Dir)

View Source (since OTP R14B01)

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

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

Link to this function

update_password(Port, Dir, Old, New, New)

View Source

Equivalent to update_password/6

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

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