authentication using scram
Perl6
Latest commit 87b714b Nov 5, 2016 @MARTIMM 2nd attempt
Permalink
Failed to load latest commit information.
doc -appveyor tests Nov 4, 2016
lib/Auth Typo in Server pod documentation Nov 3, 2016
old common.pm6 try to refactor methods and hide them. failed Sep 9, 2016
t -cleanup Nov 2, 2016
xt setup project Aug 22, 2016
.gitignore adding support to install pdf files generated from pod. Files Oct 10, 2016
.travis.yml setup project Aug 22, 2016
LICENSE setup project Aug 22, 2016
META.info
README.md -appveyor tests Nov 4, 2016
appveyor.yml 2nd attempt Nov 5, 2016

README.md

Salted Challenge Response Authentication Mechanism (SCRAM)

Build Status AppVeyor Build Status License

This package implements secure authentication mechanism.

Synopsis

# Example from rfc (C = client, s = server)
# C: n,,n=user,r=fyko+d2lbbFgONRv9qkxdawL
# S: r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,s=QSXCR+Q6sek8bf92,i=4096
# C: c=biws,r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,
#    p=v0X8v3Bz2T0CJGbJQyF0X+HI4Ts=
# S: v=rmF9pqV8S7suAoZWja4dJRkFsKQ=
#
class MyClient {

  # Send client first message to server and return server response
  method client-first ( Str:D $client-first-message --> Str ) {

    # Send $client-first-message to server;

    # Get server response, this is the server first message
    'r=fyko+d2lbbFgONRv9qkxdawL3rfcNHYJY1ZVvWVs7j,s=QSXCR+Q6sek8bf92,i=4096';
  }

  # Send client final message to server and return server response
  method client-final ( Str:D $client-final-message --> Str ) {

    # Send $client-final-message to server.

    # Server response is server final message
    'v=rmF9pqV8S7suAoZWja4dJRkFsKQ=';
  }

  method error ( Str:D $message --> Str ) {
    # Errors? nah ... (Famous last words!)
  }
}

my Auth::SCRAM $sc .= new(
  :username<user>,
  :password<pencil>,
  :client-side(MyClient.new),
);

$sc.c-nonce-size = 24;
$sc.c-nonce = 'fyko+d2lbbFgONRv9qkxdawL';

my $error = $sc.start-scram;

Documentation

Change log

Bugs, todo and known limitations

Installing

Use panda to install the package like so.

$ panda install Auth-SCRAM

or

$ zef install Auth-SCRAM

Versions of PERL, MOARVM

This project is tested with latest Rakudo built on MoarVM implementing Perl v6.c.

Authors

Marcel Timmerman (MARTIMM on github)