Handbook
Glossary
update-user ( user provider -- )
Furnace framework
»
Furnace authentication
»
Authentication providers
»
Authentication provider protocol
Prev:
new-user ( user provider -- user/f )
Vocabulary
furnace
.
auth
.
providers
Inputs
user
an
user
provider
an authentication provider
Outputs
None
Generic word contract
Stores a user back to an authentication provider after being changed. This is a no-op with in-memory providers; providers which use an external store will save the user in this word.
Definition
IN:
furnace.auth.providers
GENERIC:
update-user
( user provider -- )
Methods
USING:
accessors
assocs
couchdb
furnace.auth.providers
furnace.auth.providers.couchdb
furnace.auth.providers.couchdb.private
kernel
namespaces
;
M:
couchdb-auth-provider
update-user
couchdb-auth-provider
[
[
username>>
(get-user)/throw-on-no-user
dup
]
[
drop
"_id"
of
get-url
]
[
user>user-hash
swapd
2dup
check-update
drop
unify-users
swap
couch-put
drop
]
tri
]
with-variable
;
USING:
furnace.auth.providers
furnace.auth.providers.null
kernel
;
M:
no-users
update-user
2drop
;
USING:
db.tuples
furnace.auth.providers
furnace.auth.providers.db
kernel
;
M:
users-in-db
update-user
drop
update-tuple
;
USING:
furnace.auth.providers
furnace.auth.providers.assoc
kernel
;
M:
users-in-memory
update-user
2drop
;