-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document twofactor_totp key validation OCS API #674
Comments
Hi, @karakayasemi. As part of completing this issue, I've installed the latest version of I tested the functionality using the following curl request: curl --silent -u 'admin:admin' \
http://localhost/ocs/v1.php/apps/twofactor_totp/api/v1/validate/admin/883998?format=json | jq If "Activate TOTP" is checked and the second-factor authentication code has been verified, the following JSON response is returned: {
"ocs": {
"meta": {
"status": "failure",
"statuscode": 997,
"message": "Unauthorised",
"totalitems": "",
"itemsperpage": ""
},
"data": []
}
} However, if either:
{
"ocs": {
"meta": {
"status": "failure",
"statuscode": 404,
"message": "OK",
"totalitems": "",
"itemsperpage": ""
},
"data": {
"result": false
}
}
} Test Installation Details
|
In your tests, you are activating totp for the admin and trying to use same admin account for api call. Currently, when 2FA is activated on an account, authorization with username-password is not possible via API's. The account should authenticate via App passwords when using API's. It is similar on clients. When 2FA is enabled for an user, the user can only login clients via app password. So, either you can use app password on api call or you can disable 2FA for the admin and create another user for querying its totp validation. |
Thank you for the clarification. |
This change documents the new OCS TOTP Validation API showing what it is, how to use it, prerequisites, and example responses. It fixes #674.
This change documents the new OCS TOTP Validation API showing what it is, how to use it, prerequisites, and example responses. It fixes #674.
This change documents the new OCS TOTP Validation API showing what it is, how to use it, prerequisites, and example responses. It fixes #674.
What Needs to be Documented?
owncloud/twofactor_totp#38
Where Does This Need To Be Documented?
What Type Of Content Change Is This? (Optional)
Which Manual Does This Relate To? (Optional)
The text was updated successfully, but these errors were encountered: