Skip to content
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

OCS API #83

Merged
merged 3 commits into from
Jul 27, 2019
Merged

OCS API #83

merged 3 commits into from
Jul 27, 2019

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Jul 27, 2019

Fixes #82

Adds two endpoints

  • SERVER/ocs/v2.php/apps/password_policy/api/v1/generate
  • SERVER/ocs/v2.php/apps/password_policy/api/v1/validate

They simply do what one can expect..

For clients (so also the web) there is a capability exposed if this is available with the full URL.

This allows clients to either obtain a valid password that is satisfied
by the password policy rules. And it allows verification of given
passwords against the rules.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
Copy link
Member Author

rullzer commented Jul 27, 2019

@tobiasKaminsky also usefull for the clients

@skjnldsv skjnldsv force-pushed the ocs_api branch 2 times, most recently from 36e9841 to e5bdaaa Compare July 27, 2019 08:55
@skjnldsv
Copy link
Member

Tests failing: e5bdaaa
Tried fixing, but doesn't work? 🤔

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@skjnldsv skjnldsv merged commit f1b36fe into master Jul 27, 2019
@skjnldsv skjnldsv deleted the ocs_api branch July 27, 2019 10:28
@tobiasKaminsky
Copy link
Member

I do get wrong urls ins capabilities:

"api": {
            "generate": "http:\/\/localhost\/nc\/ocs\/v2.phpex.php\/ocsapp\/apps\/password_policy\/api\/v1\/generate",
            "validate": "http:\/\/localhost\/nc\/ocs\/v2.phpex.php\/ocsapp\/apps\/password_policy\/api\/v1\/validate"
          }
        },

@tobiasKaminsky also usefull for the clients

I currently (maybe due to Monday morning) fail to find a useful scenario.

@skjnldsv
Copy link
Member

@tobiasKaminsky when you create a link share for example? And password is enforced, you'll need a default suggested valid password :)

@MorrisJobke
Copy link
Member

        "generate": "http:\/\/localhost\/nc\/ocs\/v2.phpex.php\/ocsapp\/apps\/password_policy\/api\/v1\/generate",

I also sometimes see those URLs, but in the logs. It looks like the index.php part was there and then the actual URL was somehow overlayed onto it and thus still leaving part if the "index.php" visible.

@rullzer
Copy link
Member Author

rullzer commented Jul 29, 2019

Mmm that seems like a bug in the route generation code (not here)...

@tobiasKaminsky
Copy link
Member

@tobiasKaminsky when you create a link share for example? And password is enforced, you'll need a default suggested valid password :)

nextcloud/server#16589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API for web/clients
4 participants