jaguar_auth 0.11.1 copy "jaguar_auth: ^0.11.1" to clipboard
jaguar_auth: ^0.11.1 copied to clipboard

outdatedDart 1 only

Authentication interceptors and helper functions for Jaguar

jaguar_auth #

Authentication interceptors and helper functions for Jaguar. This package builds on Session infrastructure provided by jaguar.

This package provides three types of authentication:

  1. Basic auth
  2. Form auth
  3. JSON auth

And an Authorizer

User model #

AuthorizationUser is the base class user models must implement to work with authenticators, Authorizer and AuthModelManager.

AuthorizationUser demands that the model implements a getter named authorizationId that uniquely identifies the model.

Typically, email, username or user id is used as authorizationId to uniquely identify user models.

Example #

The following user model User uses user id as authorizationId. Notice that User implements AuthorizationUser interface.

class User implements AuthorizationUser {
  String id;

  String username;

  String password;

  User(this.id, this.username, this.password);

  String get authorizationId => id;
}

Model manager #

AuthModelManager is used by authenticators and authorizer to fetch and authenticate the user model.

TODO

Authorizer #

TODO

Basic auth #

BasicAuth performs authentication based on basic authentication.

It expects base64 encoded "username:password" pair in "authorization" header with "Basic" scheme.

TODO

Form auth #

TODO

Json auth #

TODO

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Authentication interceptors and helper functions for Jaguar

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

auth_header, crypto, jaguar, jaguar_common, jaguar_jwt, matcher

More

Packages that depend on jaguar_auth