Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Provide access to the Access Tokens API and enable initialization from OAuth Authentication Codes and Refresh Tokens#125

Merged
sQu4rks merged 2 commits into
v1.xWebexCommunity/WebexPythonSDK:v1.xfrom
feature-61WebexCommunity/WebexPythonSDK:feature-61Copy head branch name to clipboard
Jul 13, 2020
Merged

Provide access to the Access Tokens API and enable initialization from OAuth Authentication Codes and Refresh Tokens#125
sQu4rks merged 2 commits into
v1.xWebexCommunity/WebexPythonSDK:v1.xfrom
feature-61WebexCommunity/WebexPythonSDK:feature-61Copy head branch name to clipboard

Conversation

@cmlccie

@cmlccie cmlccie commented Jul 9, 2020

Copy link
Copy Markdown
Collaborator

@sQu4rks, I know you added support for #61 by extending the initializer for the WebexTeamsAPI class. What do you think of this alternative solution?

This PR provides access to the access_tokens API wrapper directly from the WebexTeamsAPI class before instantiating an instance of the class. Also, provides convenience class methods that will instantiate a new WebexTeamsAPI connection object from an OAuth Authorization Code or Refresh Token.

Example Accessing the Access Tokens API:

access_token_object = WebexTeamsAPI.access_tokens.get(client_id, client_secret, code, redirect_uri)
access_token_object = WebexTeamsAPI.access_tokens.refresh(client_id, client_secret, refresh_token)

Example Create WebexTeamsAPI Connection Objects from OAuth Access Tokens or Refresh Tokens:

api = WebexTeamsAPI.from_oauth_code(client_id, client_secret, code, redirect_uri)
api = WebexTeamsAPI.from_oauth_refresh(client_id, client_secret, refresh_token)

@cmlccie cmlccie requested a review from sQu4rks July 9, 2020 20:34
@cmlccie cmlccie changed the base branch from master to v1.x July 9, 2020 20:35
@cmlccie cmlccie linked an issue Jul 9, 2020 that may be closed by this pull request
Provide access to the access_tokens API wrapper directly from the WebexTeamsAPI class *before* instantiating an instance of the class (which requires an access token).

Also provide convenience class methods that will instantiate a new WebexTeamsAPI connection object from an OAuth Authorization Code or Refresh Token.
@sQu4rks

sQu4rks commented Jul 10, 2020

Copy link
Copy Markdown
Contributor

I like the idea! Let me review the code a bit more in-depth.

@sQu4rks sQu4rks merged commit 496507a into v1.x Jul 13, 2020
@sQu4rks

sQu4rks commented Jul 13, 2020

Copy link
Copy Markdown
Contributor

Happy with these changes. I'll merge the PR.

@cmlccie cmlccie deleted the feature-61 branch February 19, 2024 19:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add ability to initialise API object using OAUTH details

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.