The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Authen::SASL::SCRAM - SCRAM support for Authen::SASL

VERSION

0.04

SYNOPSIS

# with Authen::SASL::SCRAM installed
use Authen::SASL;

my $client = Authen::SASL->new(
     username => 'user',
     password => 'pass',
     mechanism => 'SCRAM-SHA-512 SCRAM-SHA-256 SCRAM-SHA-1 PLAIN'
);
# authenticates using SCRAM SHA hash or PLAIN


my $salt = 'your-precious-salt';
# $server_key and $stored_key need to be looked up from a user store
my $server_key = 'server-key-stored-for-this-user';
my $stored_key = 'key-stored-for-this-user';
my $server => Authen::SASL->new(
    mechanism => 'SCRAM-SHA-1', # selected mechanism
    callback => {
         getsecret => sub {
              my $username = shift;
              return ($salt, $stored_key, $server_key, $iterations);
         },
    }
);

DESCRIPTION

The Authen::SASL::SCRAM distribution adds Authen::SASL support for SCRAM authentication using the mechanisms listed below by wrapping Authen::SCRAM.

SHA-1 (SCRAM-SHA-1)
SHA-256 (SCRAM-SHA-256)
SHA-512 (SCRAM-SHA-512)

The *-PLUS variants are not supported at this time.

BUGS

Please report bugs via https://github.com/ehuelsmann/authen-sasl-scram/issues.

SEE ALSO

Authen::SASL, Authen::SCRAM

AUTHOR

Erik Huelsmann <ehuels@gmail.com>

COPYRIGHT

Copyright (c) 2023 Erik Huelsmann. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.