Skip to content

Add new pages to the examples covering the Auth procedure#7

Open
Kajetan-Narkiewicz-Planview wants to merge 1 commit intomainfrom
update_api_code_examples
Open

Add new pages to the examples covering the Auth procedure#7
Kajetan-Narkiewicz-Planview wants to merge 1 commit intomainfrom
update_api_code_examples

Conversation

@Kajetan-Narkiewicz-Planview
Copy link

@Kajetan-Narkiewicz-Planview Kajetan-Narkiewicz-Planview commented Mar 12, 2026

- Add OAuth2 Authorization Code Flow example (py-oauth2-authorization-code/)
  - Complete flow with local callback server for OAuth redirect
  - Token refresh demonstration
  - Production-ready patterns with error handling

- Add OAuth2 Client Credentials Flow example (py-oauth2-client-credentials/)
  - Robot/service account authentication
  - Reusable OAuth2ClientCredentials class with automatic token management
  - Multiple authentication method examples (Basic Auth, body params)

- Add OAuth1 example (py-oauth1/)
  - Legacy authentication support
  - Complete 3-legged OAuth1 flow
  - Migration guidance to OAuth2

- Add AUTH_README.md with:
  - Decision guide for choosing authentication method
  - Quick comparison table
  - Security best practices
  - Troubleshooting guide

- Update main readme.md with authentication section and example index

Each example includes Python script, README with usage instructions,
and requirements.txt for dependencies.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds new authentication-focused example pages/scripts to the examples/ area to help developers choose and implement the right ProjectPlace auth flow (OAuth2 Auth Code, OAuth2 Client Credentials, and legacy OAuth1), plus updates the examples index/docs to highlight them.

Changes:

  • Adds new Python example directories for OAuth2 Authorization Code, OAuth2 Client Credentials, and OAuth1 flows (each with script, README, requirements).
  • Adds examples/AUTH_README.md as an authentication decision guide and updates examples/readme.md to index auth examples.
  • Adds an examples/.gitignore for common local Python artifacts and credential files.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
examples/readme.md Adds an authentication “getting started” section and indexes auth examples.
examples/AUTH_README.md Adds an auth method decision guide, comparison table, and best practices.
examples/.gitignore Adds ignore patterns for venvs, IDE files, and local credential files.
examples/py-oauth2-authorization-code/requirements.txt Adds Python dependency list for the auth-code example.
examples/py-oauth2-authorization-code/readme.md Documents the OAuth2 auth-code example usage and concepts.
examples/py-oauth2-authorization-code/oauth2_authorization_code.py Implements an interactive local-callback OAuth2 auth-code flow demo.
examples/py-oauth2-client-credentials/requirements.txt Adds Python dependency list for the client-credentials example.
examples/py-oauth2-client-credentials/readme.md Documents the OAuth2 client-credentials example usage and concepts.
examples/py-oauth2-client-credentials/oauth2_client_credentials.py Implements client-credentials flow plus a reusable helper class.
examples/py-oauth1/requirements.txt Adds Python dependencies for the OAuth1 example.
examples/py-oauth1/readme.md Documents the legacy OAuth1 example and migration guidance.
examples/py-oauth1/oauth1_flow.py Implements a 3-legged OAuth1 flow demo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

- Add OAuth2 Authorization Code Flow example (py-oauth2-authorization-code/)
  - Complete flow with local callback server for OAuth redirect
  - Token refresh demonstration
  - Production-ready patterns with error handling

- Add OAuth2 Client Credentials Flow example (py-oauth2-client-credentials/)
  - Robot/service account authentication
  - Reusable OAuth2ClientCredentials class with automatic token management
  - Multiple authentication method examples (Basic Auth, body params)

- Add OAuth1 example (py-oauth1/)
  - Legacy authentication support
  - Complete 3-legged OAuth1 flow
  - Migration guidance to OAuth2

- Add AUTH_README.md with:
  - Decision guide for choosing authentication method
  - Quick comparison table
  - Security best practices
  - Troubleshooting guide

- Update main readme.md with authentication section and example index

Each example includes Python script, README with usage instructions,
and requirements.txt for dependencies.

https://planview.projectplace.com/#direct/card/26044157
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.

2 participants