This repository was archived by the owner on Oct 3, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed
Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,8 @@ The following environment variables are supported:
131131 Optional OAuth 2 authorization endpoint URL for protecting the UI.
132132``ACCESS_TOKEN_URL ``
133133 Optional token endpoint URL for the OAuth 2 Authorization Code Grant flow.
134+ ``SCOPE ``
135+ Optional scope specifies level of access that the application is requesting.
134136``CLUSTERS ``
135137 Comma separated list of Kubernetes API server URLs. It defaults to ``http://localhost:8001/ `` (default endpoint of ``kubectl proxy ``).
136138``CLUSTER_REGISTRY_URL ``
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ Relevant configuration settings (environment variables) for OAuth are:
1212 OAuth 2 authorization endpoint URL, e.g. https://oauth2.example.org/authorize
1313``ACCESS_TOKEN_URL ``
1414 Token endpoint URL for the OAuth 2 Authorization Code Grant flow, e.g. https://oauth2.example.org/token
15+ ``SCOPE ``
16+ OAuth 2 scopes provide a way to limit the amount of access that is granted to an access token, e.g. https://oauth2.example.org/authorize/readonly
1517``CREDENTIALS_DIR ``
1618 Folder path to load client credentials from. The folder needs to contain two files: ``authcode-client-id `` and ``authcode-client-secret ``.
1719
Original file line number Diff line number Diff line change 3434SERVER_STATUS = {'shutdown' : False }
3535AUTHORIZE_URL = os .getenv ('AUTHORIZE_URL' )
3636APP_URL = os .getenv ('APP_URL' )
37+ SCOPE = os .getenv ('SCOPE' )
3738
3839app = Flask (__name__ )
3940
4546 request_token_url = None ,
4647 access_token_method = 'POST' ,
4748 access_token_url = os .getenv ('ACCESS_TOKEN_URL' ),
48- authorize_url = AUTHORIZE_URL
49+ authorize_url = AUTHORIZE_URL ,
50+ request_token_params = {'scope' : SCOPE } if SCOPE else None
4951)
5052oauth .remote_apps ['auth' ] = auth
5153
You can’t perform that action at this time.
0 commit comments