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

Overview

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.

You might also like...

This demo shows how you can open an expansion tile while closing an already open expansion tile.

This demo shows how you can open an expansion tile while closing an already open expansion tile.

Expansion Tile Open/Close Demo This demo shows you how to open an expansion tile while simultaneously closing an already open tile while maintaining a

Oct 21, 2022

QUICKNOTES is a simple Note taking app, you can easily manages your TODOs

QUICKNOTES is a simple Note taking app, you can easily manages your TODOs

QUICKNOTES is a simple Note taking app, you can easily manages your TODOs. It has a simple UI with Dark & Light Themes.

May 2, 2022

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

Dec 18, 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

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

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

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

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

Aug 18, 2022

A dialog queue for you to manage your dialogs to display on flutter platform

A dialog queue for you to manage your dialogs to display on flutter platform

A dialog queue for you to manage your dialogs to display on flutter platform 中文 Features Support pop dialog orderly Support pop dialog by priority Sup

Nov 1, 2022
Releases(1.0.3)
  • 1.0.3(Dec 14, 2021)

    Please refer to the following release note for the updated contents

    • https://github.com/myConsciousness/authorization-header/blob/main/CHANGELOG.md
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Dec 14, 2021)

    Please refer to the following release note for the updated contents

    • https://github.com/myConsciousness/authorization-header/blob/main/CHANGELOG.md
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Dec 13, 2021)

    Please refer to the following release note for the updated contents

    • https://github.com/myConsciousness/authorization-header/blob/main/CHANGELOG.md
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Dec 8, 2021)

    Please refer to the following release note for the updated contents

    • https://github.com/myConsciousness/authorization-header/blob/main/CHANGELOG.md
    Source code(tar.gz)
    Source code(zip)
  • 0.0.1(Dec 8, 2021)

Owner
Kato Shinya
Freelance software developer. Web and Batch development in Java. Also mobile development in Flutter.
Kato Shinya
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

Kato Shinya 18 Oct 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! 1. About 1.1. Introduction 1.1.1. Install Library 1.1.2. Import It 1.1.3. Use SweetCookieJar 1

Kato Shinya 9 Oct 27, 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.

Kato Shinya 1 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.

Kato Shinya 2 Apr 7, 2022
Portarius is a free, open-source, cross-platform mobile application that allows you to manage your Portainer sessions.

Portarius [Latin: Porta/Door Arius/Keeper] Features User management See running/stopped containers (and also start/stop and restart them) See containe

Zbe 54 Jan 7, 2023
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

刘彦博 73 Nov 4, 2022
This package will help you to manage the overlays in your projects. Show a dialog, notification, window, or a panel easily

This package will help you to manage the overlays in your projects. Show a dialog, notification, window, or a panel easily. or use one of the helping widgets like AutoComplete, Expander(Dropdown).

Schaban Bochi 25 Dec 4, 2022
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

Gloria Thomas 18 Jul 23, 2022
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.

Kato Shinya 1 Dec 16, 2021