rikulo_security 0.8.5

Rikulo Security

Rikulo Security is a lightweight and highly customizable authentication and access-control framework for Rikulo Stream.

Stream is distributed under an Apache 2.0 License.

Build Status

Installation

Add this to your pubspec.yaml (or create it):

dependencies:
  rikulo_security:

Then run the Pub Package Manager (comes with the Dart SDK):

pub install

Usage

First, you have to implement Authenticator. For sake of description, we use a dummy implementation here called DummyAuthenticator:

 final authenticator = new DummyAuthenticator()
   ..addUser("john", "123", ["user"])
   ..addUser("peter", "123", ["user", "admin"]);

Second, you can use SimpleAccessControl or implement your own access control (AccessControl):

 final accessControl = new SimpleAccessControl({
   "/admin/.*": ["admin"],
   "/member/.*": ["user", "admin"]
 });

Finally, instantiate Security with the authenticator and access control you want:

 final security = new Security(authenticator, accessControl);
 new StreamServer(uriMapping: {
   "/s_login": security.login,
   "/s_logout": security.logout
 }, filterMapping: {
   "/.*": security.filter
 }).start();

Please refer to this sample application for more information.

Notes to Contributors

Fork Rikulo Security

If you'd like to contribute back to the core, you can fork this repository and send us a pull request, when it is ready.

Please be aware that one of Rikulo Security's design goals is to keep the sphere of API as neat and consistency as possible. Strong enhancement always demands greater consensus.

If you are new to Git or GitHub, please read this guide first.

Who Uses

  • Quire - a simple, collaborative, multi-level task management tool.

1. Depend on it

Add this to your package's pubspec.yaml file:

dependencies:
  rikulo_security: "^0.8.5"

2. Install it

You can install packages from the command line:

$ pub get

Alternatively, your editor might support 'pub get'. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:rikulo_security/plugin.dart';
import 'package:rikulo_security/security.dart';

About

A lightweight and highly customizable authentication and access-control framework for Rikulo Stream.

Author

Email tomyeh@rikulo.org Tom Yeh

Homepage

rikulo.org/projects/stream

Documentation

www.dartdocs.org/documentation/rikulo_security/0.8.5/

Source code (hyperlinked)

www.crossdart.info/p/rikulo_security/0.8.5/

Uploader

tomyeh@rikulo.org

Published

Apr 12, 2017

Share