Skip to content

feat : Added Basic Authorization in API request #680

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

Closed
wants to merge 5 commits into from

Conversation

maiHydrogen
Copy link
Contributor

PR Description

Added Basic Authorization method for both rest and graphql apis by directly injecting the authorization header into the sendhttprequest method without making any changes in existing httprequest model because of thier freezed nature and this method provides more scope for scalability for future auth methods.

Related Issues

Screenshots

Screenshot 2025-03-20 071754
Screenshot 2025-03-20 071824
Screenshot 2025-03-20 071932
Screenshot 2025-03-20 071958

Checklist

  • I have gone through the contributing guide
  • I have updated my branch and synced it with project main branch before making this PR
  • I am using the latest Flutter stable branch (run flutter upgrade and verify)
  • I have run the tests (flutter test) and all melos tests are passing

Added/updated tests?

We encourage you to add relevant test cases.

  • Yes
  • No, and this is why: I wanted to but i didn't know how to that is why I couldn't add them.

OS on which you have developed and tested the feature?

  • Windows
  • macOS
  • Linux

@maiHydrogen maiHydrogen changed the title Added Basic Authorization in API request feat : Added Basic Authorization in API request Mar 20, 2025
@animator
Copy link
Member

Good start, but the current approach:

  • Is not extensible and requires more data model thinking
  • Uses a new authprovider, which must not be the case as auth should be part of the request model.

@animator animator closed this Mar 31, 2025
@maiHydrogen
Copy link
Contributor Author

Good start, but the current approach:

  • Is not extensible and requires more data model thinking
  • Uses a new authprovider, which must not be the case as auth should be part of the request model.

I'm working on this as per instructions of ashita ma'am she said the same as you told , and sorry for running late as i'm being interrupted by my college exams. I'll try to modify my approach to meet your requirements as soon as possible.

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.

Add API Auth: Basic authentication
2 participants