Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[AutoPR graphrbac/data-plane] Added OAuth2 GET and POST to GraphRBAC.json spec #3063

Merged
merged 5 commits into from
Aug 22, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Generated from 6aa96687989842d043047ab3b93cd2e5e66b5dd5
OAuth2 Permissions added to GraphRBAC stable cleanup and validate
  • Loading branch information
AutorestCI committed Aug 7, 2018
commit f98df557163aafdcbac2137e565e4c7e3c772b3b
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ def __init__(self, client, config, serializer, deserializer):

def get(
self, filter=None, custom_headers=None, raw=False, **operation_config):
"""
"""Queries OAuth2 permissions for the relevant SP ObjectId of an app.

:param filter:
:type filter: str
@@ -99,7 +99,7 @@ def get(

def post(
Copy link
Member

Choose a reason for hiding this comment

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

@yugangw-msft This should not be called "post", that's putting in Python API some HTTP verbs for no reason. Should be called "premission_grants".
For instance, what is there is another POST command related to oauth2?
I strongly suggest we rename this based on naming recommendation before merging it.

self, body=None, custom_headers=None, raw=False, **operation_config):
"""
"""Grants OAuth2 permissions for the relevant resource Ids of an app.

:param body:
:type body: ~azure.graphrbac.models.OAuth2
Original file line number Diff line number Diff line change
@@ -223,13 +223,12 @@ def delete(
delete.metadata = {'url': '/{tenantID}/servicePrincipals/{objectId}'}

def get(
self, object_id, filter=None, custom_headers=None, raw=False, **operation_config):
"""Gets service principal information from the directory.
self, object_id, custom_headers=None, raw=False, **operation_config):
"""Gets service principal information from the directory. Query by
objectId or pass a filter to query by appId.

:param object_id: The object ID of the service principal to get.
:type object_id: str
:param filter:
:type filter: str
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
@@ -251,8 +250,6 @@ def get(

# Construct parameters
query_parameters = {}
if filter is not None:
query_parameters['$filter'] = self._serialize.query("filter", filter, 'str')
query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str')

# Construct headers