Ability to inherit auth credentials #917
Open
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.
🚀 Pull Request: Auth Inheritance Feature
🧩 PR Description
This PR implements the Auth Inheritance Feature for the APIDash project — enabling requests to inherit authentication credentials from their active environment.
🌍 Overview
This brings Postman/Insomnia-like behavior, where users can define authentication at the environment level and reuse it across multiple requests automatically.
🔧 Problem
Previously, APIDash only supported per-request authentication, forcing users to manually configure identical credentials for multiple requests — causing:
💡 Solution
Auth inheritance adds the ability for requests to use the environment’s default authentication when selected.
Implemented by:
EnvironmentModelto include default authenticationauthInheritanceTypeinHttpRequestModel(Enum:none,environment)CollectionStateNotifierto apply inherited auth dynamically⚙️ Key Technical Changes
defaultAuthModelfield inEnvironmentModelauthInheritanceTypefield (AuthInheritanceTypeenum) inHttpRequestModelAuthInheritanceTypeenum with values:none→ Use request-specific authenvironment→ Inherit from environmentCollectionStateNotifier🧠 Benefits
✅ Reduced Duplication: Single configuration for multiple requests
✅ Centralized Management: Modify environment-level auth once, apply everywhere
✅ Familiar Workflow: Mirrors Postman/Insomnia UX
✅ Backward Compatible: Default behavior unchanged (
none)✅ Environment Variable Support: Works with inherited credentials
🔗 Related Issues
Ability to inherit auth credentials #881
✅ Checklist
mainbefore making this PRflutter upgrade)flutter test) and verified they pass🧪 Added / Updated Tests
We encourage you to add relevant test cases.
💻 OS Used for Development and Testing
🧩 References
🧑💻 Author: @orbaps
📅 Date:
1st November