Copyright © 2019-2021 Marc Worrell
Behaviours: zotonic_model.
Authors: Marc Worrell (marc@worrell.nl).
is_totp_enabled/2 | Check if totp is enabled for the given user. |
is_valid_totp/3 | Check if the given code is a valid TOTP code. |
m_get/3 | |
mode/1 | Check the totp mode. |
request_key/1 | |
set_request_key/1 | |
totp_disable/2 | Remove the totp tokens and disable totp for the user. |
totp_image_url/2 | Generate a new totp code and return the barcode / QR code. |
user_mode/1 | Check the totp mode for the current user: 0 = optional, 1 = ask, 2 = required. |
is_totp_enabled(UserId::m_rsc:resource_id(), Context::z:context()) -> boolean()
Check if totp is enabled for the given user
is_valid_totp(UserId::m_rsc:resource_id(), Code::binary(), Context::z:context()) -> boolean()
Check if the given code is a valid TOTP code
m_get(Rest, Msg, Context) -> any()
mode(Context::z:context()) -> 0 | 1 | 2
Check the totp mode
request_key(Context::z:context()) -> binary() | undefined
set_request_key(Context::z:context()) -> binary() | undefined
totp_disable(UserId::m_rsc:resource_id(), Context::z:context()) -> ok
Remove the totp tokens and disable totp for the user
totp_image_url(UserId::m_rsc:resource_id(), Context::z:context()) -> {ok, {Url::binary(), Secret::binary()}} | {error, eacces}
Generate a new totp code and return the barcode / QR code
user_mode(Context::z:context()) -> 0 | 1 | 2
Check the totp mode for the current user: 0 = optional, 1 = ask, 2 = required
Generated by EDoc