Skip to content

Commit

Permalink
[AuthV2] Address Bug Bash feedback (#3782)
Browse files Browse the repository at this point in the history
* first lot of feedback

* get tests to pass

* fix static analysis errors

* remaining fixes

* fix static analysis errors

* address pr comments

* add comment

* try to pass static analysis

* make all settings slot sticky

* done

* Address Sisira's comments

* Update custom.py
  • Loading branch information
mkarmark authored Aug 30, 2021
1 parent c02aacd commit 1ea8a09
Show file tree
Hide file tree
Showing 5 changed files with 359 additions and 127 deletions.
10 changes: 10 additions & 0 deletions src/authV2/azext_authV2/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
get_three_state_flag, get_enum_type)
from azure.cli.command_modules.appservice._params import AUTH_TYPES
from azure.cli.core.local_context import LocalContextAttribute, LocalContextAction
from azure.cli.core.cloud import AZURE_PUBLIC_CLOUD, AZURE_CHINA_CLOUD, AZURE_US_GOV_CLOUD, AZURE_GERMAN_CLOUD

UNAUTHENTICATED_CLIENT_ACTION = ['RedirectToLoginPage', 'AllowAnonymous', 'RejectWith401', 'RejectWith404']
FORWARD_PROXY_CONVENTION = ['NoProxy', 'Standard', 'Custom']
CLOUD_NAMES = [AZURE_PUBLIC_CLOUD.name, AZURE_CHINA_CLOUD.name, AZURE_US_GOV_CLOUD.name, AZURE_GERMAN_CLOUD.name]


def load_arguments(self, _):
Expand Down Expand Up @@ -76,6 +78,8 @@ def load_arguments(self, _):
c.argument('allowed_token_audiences', options_list=['--allowed-token-audiences', '--allowed-audiences'],
help='The configuration settings of the allowed list of audiences from which to validate the JWT token.')
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true')
c.argument('tenant_id', options_list=['--tenant-id'],
help='The tenant id of the application.')

with self.argument_context('webapp auth facebook update') as c:
c.argument('app_id', options_list=['--app-id'],
Expand Down Expand Up @@ -149,6 +153,9 @@ def load_arguments(self, _):
help='The endpoint that contains all the configuration endpoints for the provider.')
c.argument('scopes', options_list=['--scopes'],
help='A list of the scopes that should be requested while authenticating.')
c.argument('client_secret', options_list=['--client-secret'],
help='The application secret of the app used for login.')
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true')

with self.argument_context('webapp auth openid-connect update') as c:
c.argument('provider_name', options_list=['--provider-name'], required=True,
Expand All @@ -161,6 +168,9 @@ def load_arguments(self, _):
help='The endpoint that contains all the configuration endpoints for the provider.')
c.argument('scopes', options_list=['--scopes'],
help='A list of the scopes that should be requested while authenticating.')
c.argument('client_secret', options_list=['--client-secret'],
help='The application secret of the app used for login.')
c.argument('yes', options_list=['--yes', '-y'], help='Do not prompt for confirmation.', action='store_true')

with self.argument_context('webapp auth openid-connect remove') as c:
c.argument('provider_name', options_list=['--provider-name'], required=True,
Expand Down
Loading

0 comments on commit 1ea8a09

Please sign in to comment.