Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
andgetClientSecret
: Functions to set and retrieve the OAuth2 client secret.getClientId
andsetClientId
: Functions to manage the OAuth2 client ID.setCodeVerifier
andgetCodeChallenge
: 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