| 1 |
NAME |
| 2 |
Authen::SCRAM - Salted Challenge Response Authentication Mechanism (RFC |
| 3 |
5802) |
| 4 |
|
| 5 |
VERSION |
| 6 |
version 0.011 |
| 7 |
|
| 8 |
SYNOPSIS |
| 9 |
use Authen::SCRAM::Client; |
| 10 |
use Authen::SCRAM::Server; |
| 11 |
use Try::Tiny; |
| 12 |
|
| 13 |
### CLIENT SIDE ### |
| 14 |
|
| 15 |
$client = Authen::SCRAM::Client->new( |
| 16 |
username => 'johndoe', |
| 17 |
password => 'trustno1', |
| 18 |
); |
| 19 |
|
| 20 |
try { |
| 21 |
$client_first = $client->first_msg(); |
| 22 |
|
| 23 |
# send to server and get server-first-message |
| 24 |
|
| 25 |
$client_final = $client->final_msg( $server_first ); |
| 26 |
|
| 27 |
# send to server and get server-final-message |
| 28 |
|
| 29 |
$client->validate( $server_final ); |
| 30 |
} |
| 31 |
catch { |
| 32 |
die "Authentication failed!" |
| 33 |
}; |
| 34 |
|
| 35 |
### SERVER SIDE ### |
| 36 |
|
| 37 |
$server = Authen::SCRAM::Server->new( |
| 38 |
credential_cb => \&get_credentials, |
| 39 |
); |
| 40 |
|
| 41 |
$username = try { |
| 42 |
# get client-first-message |
| 43 |
|
| 44 |
$server_first = $server->first_msg( $client_first ); |
| 45 |
|
| 46 |
# send to client and get client-final-message |
| 47 |
|
| 48 |
$server_final = $server->final_msg( $client_final ); |
| 49 |
|
| 50 |
# send to client |
| 51 |
|
| 52 |
return $server->authorization_id; # returns valid username |
| 53 |
} |
| 54 |
catch { |
| 55 |
die "Authentication failed!" |
| 56 |
}; |
| 57 |
|
| 58 |
DESCRIPTION |
| 59 |
The modules in this distribution implement the Salted Challenge Response |
| 60 |
Authentication Mechanism (SCRAM) from RFC 5802. |
| 61 |
|
| 62 |
See Authen::SCRAM::Client and Authen::SCRAM::Server for usage details. |
| 63 |
|
| 64 |
NAME |
| 65 |
Authen::SCRAM - Salted Challenge Response Authentication Mechanism (RFC |
| 66 |
5802) |
| 67 |
|
| 68 |
VERSION |
| 69 |
version 0.011 |
| 70 |
|
| 71 |
SUPPORT |
| 72 |
Bugs / Feature Requests |
| 73 |
Please report any bugs or feature requests through the issue tracker at |
| 74 |
<https://github.com/dagolden/Authen-SCRAM/issues>. You will be notified |
| 75 |
automatically of any progress on your issue. |
| 76 |
|
| 77 |
Source Code |
| 78 |
This is open source software. The code repository is available for |
| 79 |
public review and contribution under the terms of the license. |
| 80 |
|
| 81 |
<https://github.com/dagolden/Authen-SCRAM> |
| 82 |
|
| 83 |
git clone https://github.com/dagolden/Authen-SCRAM.git |
| 84 |
|
| 85 |
AUTHOR |
| 86 |
David Golden <[email protected]> |
| 87 |
|
| 88 |
CONTRIBUTOR |
| 89 |
David Golden <[email protected]> |
| 90 |
|
| 91 |
COPYRIGHT AND LICENSE |
| 92 |
This software is Copyright (c) 2014 by David Golden. |
| 93 |
|
| 94 |
This is free software, licensed under: |
| 95 |
|
| 96 |
The Apache License, Version 2.0, January 2004 |
| 97 |
|
| 98 |
SUPPORT |
| 99 |
Bugs / Feature Requests |
| 100 |
Please report any bugs or feature requests through the issue tracker at |
| 101 |
<https://github.com/dagolden/Authen-SCRAM/issues>. You will be notified |
| 102 |
automatically of any progress on your issue. |
| 103 |
|
| 104 |
Source Code |
| 105 |
This is open source software. The code repository is available for |
| 106 |
public review and contribution under the terms of the license. |
| 107 |
|
| 108 |
<https://github.com/dagolden/Authen-SCRAM> |
| 109 |
|
| 110 |
git clone https://github.com/dagolden/Authen-SCRAM.git |
| 111 |
|
| 112 |
AUTHOR |
| 113 |
David Golden <[email protected]> |
| 114 |
|
| 115 |
CONTRIBUTOR |
| 116 |
David Golden <[email protected]> |
| 117 |
|
| 118 |
COPYRIGHT AND LICENSE |
| 119 |
This software is Copyright (c) 2014 by David Golden. |
| 120 |
|
| 121 |
This is free software, licensed under: |
| 122 |
|
| 123 |
The Apache License, Version 2.0, January 2004 |
| 124 |
|