Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Added ability to specify a permission scope to SkyAuthHttp #245

Merged
merged 4 commits into from
Jul 26, 2017

Conversation

Blackbaud-PaulCrowder
Copy link
Member

No description provided.

@codecov-io
Copy link

codecov-io commented Jul 25, 2017

Codecov Report

Merging #245 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #245   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          54     54           
  Lines        1241   1249    +8     
  Branches      183    184    +1     
=====================================
+ Hits         1241   1249    +8
Flag Coverage Δ
#builder 100% <ø> (ø) ⬆️
#runtime 100% <100%> (ø) ⬆️
#srcapp 100% <ø> (ø) ⬆️
Impacted Files Coverage Δ
runtime/auth-token-provider.ts 100% <100%> (ø) ⬆️
runtime/auth-http.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b647924...8e47811. Read the comment docs.

@Blackbaud-SteveBrush
Copy link
Member

Blackbaud-SteveBrush commented Jul 26, 2017

I'm assuming if multiple scopes were needed, we could pass in a comma-separated string, .withScope('id,first_name,last_name'), for example. It would then be the responsibility of the backend service to parse the scopes appropriately?

@Blackbaud-PaulCrowder
Copy link
Member Author

Blackbaud-PaulCrowder commented Jul 26, 2017

When SKY UX worked with the permissions and auth teams on defining permission scopes, we decided we would not support accepting multiple permission scopes when retrieving a token. If a caller needs more permissions than an existing permission scope already contains, they will need to register a new permission scope with the permissions service.

// property set. When chained, the end call would look something like this:
// http.withScope('abc').get(url);

const http = new SkyAuthHttp(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this; prevents the scope from being applied to all subsequent requests.

Copy link
Member

@Blackbaud-SteveBrush Blackbaud-SteveBrush left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

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

Successfully merging this pull request may close these issues.

3 participants