Skip to content

Commit 5987f82

Browse files
authored
Merge pull request #92 from CMSgov/jimfuqian/BB2-3798-sample-client-python-v2-scopes
jimfuqian/BB2-3798 Python sample client use SMART App v2 scopes
2 parents ea72b8e + e122fc7 commit 5987f82

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

server/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ RUN if [ "$BUILD_DEVELOPMENT" = "True" ]; then \
2020
fi
2121

2222
RUN pipenv lock
23+
RUN pip install click
2324
RUN pipenv install --system --deploy --ignore-pipfile

server/app.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@
3535

3636
@app.route('/api/authorize/authurl', methods=['GET'])
3737
def get_auth_url():
38-
redirect_url = bb.generate_authorize_url(auth_data)
38+
# for SMART App v2 scopes usage: explicitly
39+
# provide query parameter scope=<v2 scopes>
40+
# where <v2 scopes> is space delimited v2 scope specs (url encoded)
41+
# e.g. patient/ExplanationOfBenefit.rs
42+
redirect_url = (bb.generate_authorize_url(auth_data)
43+
+ "&scope=patient%2FExplanationOfBenefit.s")
3944
return redirect_url
4045

4146

0 commit comments

Comments
 (0)