-
Notifications
You must be signed in to change notification settings - Fork 535
GSOC API Auth Draft-PR #776
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
base: main
Are you sure you want to change the base?
Conversation
Hey @StormGear,
The authorization header checking and substitution should only happen for the headers that are being sent with the current request. It should not modify or persist any changes to the headers stored within the collection providers. The collection provider's headers should remain exactly as the user originally defined them. |
Hello @DenserMeerkat , |
PR Description
Simple username/password transmission
Credentials encoded in Base64
Sent via HTTP Authorization header.
Single token for identifying application/user
Can be sent via Request headers or
Query parameters
Uses access tokens for authorization typically JWT-based
Stateless authentication mechanism.
My Approach
New Models
I created new models (
AuthorizationModel
) with various submodels (BasicAuthModel
,BearerAuthModel
,ApikeyAuthModels
). These are data models that handle data entered by users.AuthorizationModel
has fieldsAuthType
authType - The type of authorization.Bool
isEnabled - Is authorization enabled for selected request?BasicAuthModel
basicAuthModel - stores data for basic authorization typeBearerAuthModel
bearerAuthModel - stores data for bearer authorization typeApikeyAuthModel
apikeyAuthModel - stores data for api key authorization typeStateProviders
AuthorizationProvider
for managing the state of the Authorization typesupdate
method to update fields within the Authorization model_syncwithRequest
method to sync these values with the selectedRequestModel
User Interface
A Tab for enabling and including the various Authorization tabs, currently implemently in this draft PR:
A Visual Summary of My Approach
In this image, I have visually presented my approach to this draft PR.

A Video Demo
In this video, I demonstrate how to enable Authorization for Basic Authorization as well as Bearer Token Authorization. Nasa and Postman Public APIs were used as they support these types of authorization.
I attempted to upload the video here several times, somehow, it wasn't working, hence I have placed the video in this Gdrive:
Link to Video Demo
As I progress through this contribution more authorization types will be incrementally added.
Related Issues
Checklist
main
branch before making this PRflutter upgrade
and verify)flutter test
) and all tests are passingAdded/updated tests?
OS on which you have developed and tested the feature?