FLUTTER ECOSYSTEM

marcoesposito1988/http_auth

Um middleware http para autenticação HTTP (Básica/Digest)

Capa do projeto http_auth
Stars
19
Forks
11
Último push (UTC)
24 de jul. de 2026
Status do projeto
Ativo
Marco Esposito GitHub avatar
GITHUB User

Marco Esposito ↗

@ImFusionGmbHMunichSite oficial ↗
LinguagensDart

Tópicos técnicos

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 5 itens

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

pub package

http_auth

An http middleware for HTTP authentication (Basic/Digest).

The method (Basic or Digest) can optionally be autodetected.

Usage

HTTP Basic authentication:

    import 'package:http_auth/http_auth.dart';

    main() async {
      var client = http_auth.BasicAuthClient('user', 'passwd');
      var response = client.get('http://httpbin.org/basic-auth/user/passwd');
    }

HTTP Digest authentication:

    import 'package:http_auth/http_auth.dart';

    main() async {
      var client = http_auth.DigestAuthClient('user', 'passwd');
      var response = client.get('http://httpbin.org/digest-auth/auth/user/passwd');
    }

Automatic detection of the protocol (Basic or Digest):

    import 'package:http_auth/http_auth.dart';

    main() async {
      var client = http_auth.NegotiateAuthClient('user', 'passwd');
      var response = client.get('http://httpbin.org/digest-auth/auth/user/passwd');
    }

Synchronous usage is also possible (see the example).