Modify custom auth token backend documentation with working endpoint.#11599
Open
Irash-Perera wants to merge 2 commits into
Open
Modify custom auth token backend documentation with working endpoint.#11599Irash-Perera wants to merge 2 commits into
Irash-Perera wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addressed Issue: #4949
The tutorial at
en/docs/api-gateway/policies/passing-a-custom-authorization-token-to-the-backend.mdinstructed users to create an API using the following hosted sample backend as the endpoint:
This endpoint is no longer available, so the tutorial could not be completed as written. This PR replaces the dead hosted endpoint with instructions for running the equivalent sample backend locally.
Changes
1. New step: start the sample backend server locally
A new Step 2 guides the user to run the sample validation backend from the WSO2 API Manager Samples repository (
custom-auth-token-backenddirectory):git clone https://github.com/wso2/samples-apim cd samples-apim/custom-auth-token-backend python3 server.pyPR for the sample backend in the
samples-apimrepository: Add sample backend server for validating custom authorization tokens #165The server listens on
http://localhost:8080, accepts any path and method, and authorizes a request only when theAuthorizationheader is exactlyBearer 1234- the same contract the old hosted backend implemented. It also echoes back the headers it received and logs every request to the terminal, so users can verify exactly whatthe gateway forwarded to the backend.
2. Updated API endpoint
The endpoint in the API creation table now points to the local server:
3. Step numbering and cross-reference fixes
The step list previously had broken numbering (…5, 6, then 5, 6, 7, 24). Steps now run sequentially from 1 to 11, and in-text references ("the token that you got in step 8", "the policy that you just created by following Step 4") were updated to match.