Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Feature/add missing endpoints 2 #7

Conversation

onyedikachi-david
Copy link

feat: Enhance SDK with OAuth2 authentication and user data retrieval

This commit introduces a series of improvements to the ZebedeeClient SDK, empowering it with OAuth2 authentication capabilities and endpoints for user data retrieval. The following functions have been added:

  • getAuthenticationUrl: Generates the authentication URL for OAuth2 authorization using the provided parameters.
  • createBrowserSafeString: Creates a browser-safe string for secure usage in OAuth2 processes.
  • setClientSecret and getClientSecret: Functions to set and retrieve the OAuth2 client secret.
  • getClientId and setClientId: Functions to manage the OAuth2 client ID.
  • setCodeVerifier and getCodeChallenge: Functions to set and retrieve the code verifier for OAuth2 PKCE flow.
  • generateCodeChallenge: Generates a code challenge for OAuth2 PKCE flow.

Furthermore, the following OAuth2 endpoints have been seamlessly integrated into the SDK:

  • GET_AUTHORIZATION_ENDPOINT: "/v1/oauth2/authorize"
  • FETCH_ACCESS_TOKEN_ENDPOINT: "/v1/oauth2/token"
  • REFRESH_TOKEN_ENDPOINT: "/v1/oauth2/token"
  • GET_USER_ENDPOINT: "/v1/oauth2/user"
  • GET_USER_WALLET_DATA_ENDPOINT: "/v1/oauth2/wallet"

In addition to the implementation, thorough function documentation has been provided, detailing the purpose, parameters, exceptions, and return types of each function.

These additions elevate the ZebedeeClient SDK to support seamless OAuth2 authentication and user data retrieval, making it a more powerful and versatile tool for developers.

Some test aren't working though, I think its from the Test API key. @andrerfneves Please review.

Fixes #4
/claim #4

@andrerfneves andrerfneves changed the base branch from main to feature/updates September 28, 2023 01:20
@andrerfneves andrerfneves merged commit 40ec224 into zebedeeio:feature/updates Sep 28, 2023
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.

Expose ZBD Login API endpoints to zbd/node SDK
2 participants