Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: strongloop/loopback
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: strongloop/loopback
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/access-scopes
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on Apr 6, 2017

  1. Add support for scoped access tokens

    Define a new property `AccessToken.scopes` to contain the list of
    scopes granted to this access token.
    
    Define a new remote method metadata `accessScopes` to contain a list
    of scope name required by this method.
    
    Define a special built-in scope name "DEFAULT" that's used when
    a method/token does not provide any scopes. This allows access
    tokens to grant access to both the default scope and any additional
    custom scopes at the same time.
    
    Modify the authorization algorithm to ensure that at least one
    of the scopes required by a remote method is allowed by the scopes
    granted to the requesting access token.
    
    The "DEFAULT" scope preserve backwards compatibility because existing
    remote methods with no `accessScopes` can be accessed by (existing)
    access tokens with no `scopes` defined.
    
    Impact on existing applications:
    
     - Database schema must be updated after upgrading the loopback version
    
     - If the application was already using a custom `AccessToken.scopes`
       property with a type different from an array, then the relevant code
       must be updated to work with the new type "array of strings".
    bajtos committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    5c04712 View commit details
    Browse the repository at this point in the history
  2. Code cleanup

    Make it easier to add method/app-level scopes in the future
    bajtos committed Apr 6, 2017
    Configuration menu
    Copy the full SHA
    fab857d View commit details
    Browse the repository at this point in the history

Commits on Apr 7, 2017

  1. Configuration menu
    Copy the full SHA
    a035db9 View commit details
    Browse the repository at this point in the history
Loading