AuthorizationHeader is an open-sourced Dart library. With AuthorizationHeader, you can easily manage authorization header on your application.

Last update: Dec 24, 2021

A most easily usable authorization header management library in Dart!

pub package Dart

1. About

AuthorizationHeader is an open-sourced Dart library.
With AuthorizationHeader, you can easily manage authorization header on your application.

The AuthorizationHeader library provides a common features for generating authorization header for use with Basic or Bearer authorization. Proxy-Authorization for proxies is also supported.

By using the AuthorizationHeader library, there is no need for redundant implementation or research to generate the authorization header anymore!

1.1. Supported

1.1.1. Authorization Header

Name
Authorization
Proxy-Authorization

1.1.2. Authorization Type

Name RFC
Basic RFC 7617
Bearer RFC 6750

1.2. Introduction

1.2.1. Install Library

With Dart:

 dart pub add authorization_header

With Flutter:

 flutter pub add authorization_header

1.2.2. Import It

import 'package:authorization_header/authorization_header.dart';

1.2.3. Use AuthorizationHeader

AuthorizationHeader can be used in conjunction with the http package as follows.

import 'package:authorization_header/authorization_header.dart';
import 'package:http/http.dart' as http;

void main() async {
  /// You can switch between Default and Proxy in the constructor.
  final authHeader = Auth.of().bearer(token: 'test_token');
  final proxyAuthHeader = Auth.ofProxy().bearer(token: 'test_token');

  print(authHeader); // -> name: Authorization, value: Bearer test
  print(proxyAuthHeader); // -> name: Proxy-Authorization, value: Bearer test

  await http.post(
    Uri.parse('https://test.com'),
    headers: {
      authHeader.name: authHeader.value,
      proxyAuthHeader.name: proxyAuthHeader.value,
    },
  );
}

1.3. License

Copyright (c) 2021, Kato Shinya. All rights reserved.
Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.

1.4. More Information

AuthorizationHeader was designed and implemented by Kato Shinya.

GitHub

https://github.com/myConsciousness/authorization-header
You might also like...

Flutter app that helps you manage your payments.

Flutter app that helps you manage your payments.

💵 PayFlow Screenshots | Tecnologias | Projeto | Licença 📸 Screenshots 🚀 Tecnologias Esse projeto foi desenvolvido com as seguintes tecnologias: Flu

Jan 1, 2022

Aris inheritedwidget - The Inherited Widget helps you to easily distribute your app state to every widget in your Flutter app

Aris inheritedwidget - The Inherited Widget helps you to easily distribute your app state to every widget in your Flutter app

Flutter Tutorial - Inherited Widget The InheritedWidget helps you to easily dist

Dec 29, 2021

Presentation-Remote-PC - Manage your presentation from your smart phone - Phone Client

Presentation-Remote-PC - Manage your presentation from your smart phone - Phone Client

Presentation-Remote-PC Manage your presentation from your smart phone - Phone Cl

Jan 25, 2022

IMP - an innovative open source application that will help people memorize text more easily

InnoMemorizerApp IMP - an innovative open source application that will help people memorize text more easily Home page Upload page Home page provides

Jun 11, 2022

dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on background

dosdownloader Dos downloader app is developed for downloading video. You can download video from YouTube and Facebook. You can also play video on back

Dec 8, 2021

You can create a star easily and decide how many angle or color of the star, even the fat and progress of the star.

You can create a star easily and decide how many angle or color of the star, even the fat and progress of the star.

Apr 14, 2021

mypro immobilier app created to manage our real estate agency, we can store products, contacts and transactions..

mypro_immobilier A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started

Dec 11, 2021

Related

A most easily usable Duolingo API wrapper in Dart. Duolingo4D is an open-sourced Dart library.

A most easily usable Duolingo API wrapper in Dart! 1. About Duolingo4D Duolingo4D is an open-sourced Dart library. With Duolingo4D, you can easily int

Jun 17, 2022
A most easily usable cookie management library in Dart. With SweetCookieJar, you can easily manage cookie on your application.
A most easily usable cookie management library in Dart. With SweetCookieJar, you can easily manage cookie on your application.

A most easily usable cookie management library in Dart! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use SweetCookieJar 1

May 19, 2022
A most easily usable cache management library in Dart. With CacheStorage, you can easily manage cache on your application.

A most easily usable cache management library in Dart! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use CacheStorage 1.2.

Dec 13, 2021
A most easily usable RESAS API wrapper in Dart. With this library, you can easily integrate your application with the RESAS API.

A most easily usable RESAS API wrapper library in Dart! 1. About 1.1. What Is RESAS? 1.2. Introduction 1.2.1. Install Library 1.2.2. Import It 1.2.3.

Apr 7, 2022
A iOS like table view including section, row, section header and divider
A iOS like table view including section, row, section header and divider

flutter_section_table_view A iOS like table view including section, row, section header and divider Support both Android and iOS Support drop-down ref

Dec 24, 2021
This is a simple open source project where you can easily contribute by uploading algorithms that are not specified in the list.
This is a simple open source project where you can easily contribute by uploading algorithms that are not specified in the list.

Support this project by giving it a thumbs up! AlgoBook A new Flutter application for algorithms. This app is mainly to refer to the algorithms that a

Jun 25, 2022
A Flutter widget that checks and displays the version status of application and you can easily guide user to update your app
A Flutter widget that checks and displays the version status of application and you can easily guide user to update your app

A most easily usable Flutter widget about application version check! 1. About 1.

Dec 16, 2021
changelog.dart provides a library and a command-line application to manage in the correct way the git metadata to build the changelog between two release
changelog.dart provides a library and a command-line application to manage in the correct way the git metadata to build the changelog between two release

changelog.dart ?? changelog.dart: a collection of tools to manages in a fashion way a repository as maintainer. ?? Project Homepage Table of Content I

Apr 2, 2022
you can open google browser in your app

flutter_open_browser A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you sta

Nov 14, 2021
An app that helps you manage your Postcard Creator orders. Built with Flutter

mailman A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if this

Jan 10, 2022