Copyright © 2009 Marc Worrell Date: 2009-04-25
Behaviours: gen_model.
Authors: Marc Worrell (marc@worrell.nl).
check_username_pw/3 | Return the rsc_id with the given username/password. |
delete/2 | |
delete_by_type/3 | |
delete_username/2 | Delete an username from a resource. |
get_props/4 | |
get_rsc/2 | Fetch all credentials belonging to the user "id". |
get_rsc/3 | |
get_username/1 | Return the username of the current user. |
get_username/2 | Return the username of the resource id, undefined if no username. |
hash/1 | Hash a password, using sha1 and a salt. |
hash_is_equal/2 | Compare if a password is the same as a hash. |
insert/4 | Create an identity record. |
insert/5 | |
insert_unique/4 | Create an unique identity record. |
insert_unique/5 | |
is_user/2 | Check if the resource has any credentials that will make him/her an user. |
is_verified/2 | Check if there is a verified identity for the user, beyond the username_pw. |
lookup_by_type_and_key/3 | |
lookup_by_type_and_key_multi/3 | |
lookup_by_username/2 | |
lookup_by_verify_key/2 | |
m_find_value/3 | Fetch the value for the key from a model source. |
m_to_list/2 | Transform a m_config value to a list, used for template loops. |
m_value/2 | Transform a model value so that it can be formatted or piped through filters. |
set_by_type/4 | |
set_props/5 | Replace any existing identity property with a new value. |
set_username/3 | Change the username of the resource id, only possible if there is already an username/password set. |
set_username_pw/4 | Set the username/password of a resource. |
set_verified/2 | Set the verified flag on a record. |
set_verified/4 | |
set_verify_key/2 |
check_username_pw(Username, Password, Context) -> {ok, Id} | {error, Reason}
Return the rsc_id with the given username/password. When succesful then updates the 'visited' timestamp of the entry.
delete(IdnId, Context) -> any()
delete_by_type(RscId, Type, Context) -> any()
delete_username(Id::ResourceId, Context) -> void
Delete an username from a resource.
get_props(RscId, Type, Key, Context) -> any()
get_rsc(Id::integer(), Context::context()) -> list()
Fetch all credentials belonging to the user "id"
get_rsc(Id, Type, Context) -> any()
get_username(Context) -> Username | undefined
Return the username of the current user
get_username(Id::ResourceId, Context) -> Username | undefined
Return the username of the resource id, undefined if no username
hash(Pw::Password) -> tuple()
Hash a password, using sha1 and a salt
hash_is_equal(Pw::Password, X2::Hash) -> bool()
Compare if a password is the same as a hash.
insert(RscId, Type, Key, Context) -> any()
Create an identity record.
insert(RscId, Type, Key, Props, Context) -> any()
insert_unique(RscId, Type, Key, Context) -> any()
Create an unique identity record.
insert_unique(RscId, Type, Key, Props, Context) -> any()
is_user(Id, Context) -> any()
Check if the resource has any credentials that will make him/her an user
is_verified(RscId, Context) -> any()
Check if there is a verified identity for the user, beyond the username_pw
lookup_by_type_and_key(Type, Key, Context) -> any()
lookup_by_type_and_key_multi(Type, Key, Context) -> any()
lookup_by_username(Key, Context) -> any()
lookup_by_verify_key(Key, Context) -> any()
m_find_value(Id::Key, M::Source, Context) -> term()
Fetch the value for the key from a model source
m_to_list(M::Source, Context) -> List
Transform a m_config value to a list, used for template loops
m_value(M::Source, Context) -> term()
Transform a model value so that it can be formatted or piped through filters
set_by_type(RscId, Type, Key, Context) -> any()
set_props(RscId, Type, Key, Props, Context) -> any()
Replace any existing identity property with a new value
set_username(Id::ResourceId, Username, Context) -> ok | {error, Reason}
Change the username of the resource id, only possible if there is already an username/password set
set_username_pw(Id::RscId, Username, Password, Context) -> ok | {error, Reason}
Set the username/password of a resource. Replaces any existing username/password.
set_verified(Id, Context) -> any()
Set the verified flag on a record.
set_verified(RscId, Type, Key, Context) -> any()
set_verify_key(Id, Context) -> any()
Generated by EDoc, Feb 25 2011, 21:14:42.