WP-API / WP-API/OAuth2

Implement scopes

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
PHP
Stars
175
Forks
45
Avg merge
17h 8m
Merged PRs (30d)
4

Description

OAuth 2 has "scopes", which allow apps to limit their access to user data. Scopes are required per the spec, so we need to decide what we're going to do with them. (The scope parameter is a space-delimited list.)

There's a few options for what we could do here:

  • Ignore the scope parameter, and have a dummy value for clients which need one (e.g. *)
  • Allow clients to specify roles they're requesting: scope=subscriber could be used if the app only needs user-level data, e.g.
    • We could also allow clients to specify exact caps that they want as well, e.g. scope=subscriber edit_posts
  • Use handcrafted scopes: scope=user.read. I have an existing design for this from the OAuth 1 days.

These each have benefits and drawbacks, so we need to decide what we want to do.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/spec.md's authorization-scope section and compare it with the three alternatives listed in the issue. The work is not ready for implementation until one scope model is chosen; done means the selected behavior is specified and implemented consistently with the OAuth 2 scope parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
authorization, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.