1Authen::SCRAM(3)      User Contributed Perl Documentation     Authen::SCRAM(3)
2
3
4

NAME

6       Authen::SCRAM - Salted Challenge Response Authentication Mechanism (RFC
7       5802)
8

VERSION

10       version 0.011
11

SYNOPSIS

13           use Authen::SCRAM::Client;
14           use Authen::SCRAM::Server;
15           use Try::Tiny;
16
17           ### CLIENT SIDE ###
18
19           $client = Authen::SCRAM::Client->new(
20               username => 'johndoe',
21               password => 'trustno1',
22           );
23
24           try {
25               $client_first = $client->first_msg();
26
27               # send to server and get server-first-message
28
29               $client_final = $client->final_msg( $server_first );
30
31               # send to server and get server-final-message
32
33               $client->validate( $server_final );
34           }
35           catch {
36               die "Authentication failed!"
37           };
38
39           ### SERVER SIDE ###
40
41           $server = Authen::SCRAM::Server->new(
42               credential_cb => \&get_credentials,
43           );
44
45           $username = try {
46               # get client-first-message
47
48               $server_first = $server->first_msg( $client_first );
49
50               # send to client and get client-final-message
51
52               $server_final = $server->final_msg( $client_final );
53
54               # send to client
55
56               return $server->authorization_id; # returns valid username
57           }
58           catch {
59               die "Authentication failed!"
60           };
61

DESCRIPTION

63       The modules in this distribution implement the Salted Challenge
64       Response Authentication Mechanism (SCRAM) from RFC 5802.
65
66       See Authen::SCRAM::Client and Authen::SCRAM::Server for usage details.
67

NAME

69       Authen::SCRAM - Salted Challenge Response Authentication Mechanism (RFC
70       5802)
71

VERSION

73       version 0.011
74

SUPPORT

76   Bugs / Feature Requests
77       Please report any bugs or feature requests through the issue tracker at
78       <https://github.com/dagolden/Authen-SCRAM/issues>.  You will be
79       notified automatically of any progress on your issue.
80
81   Source Code
82       This is open source software.  The code repository is available for
83       public review and contribution under the terms of the license.
84
85       <https://github.com/dagolden/Authen-SCRAM>
86
87         git clone https://github.com/dagolden/Authen-SCRAM.git
88

AUTHOR

90       David Golden <dagolden@cpan.org>
91

CONTRIBUTOR

93       David Golden <xdg@xdg.me>
94
96       This software is Copyright (c) 2014 by David Golden.
97
98       This is free software, licensed under:
99
100         The Apache License, Version 2.0, January 2004
101

SUPPORT

103   Bugs / Feature Requests
104       Please report any bugs or feature requests through the issue tracker at
105       <https://github.com/dagolden/Authen-SCRAM/issues>.  You will be
106       notified automatically of any progress on your issue.
107
108   Source Code
109       This is open source software.  The code repository is available for
110       public review and contribution under the terms of the license.
111
112       <https://github.com/dagolden/Authen-SCRAM>
113
114         git clone https://github.com/dagolden/Authen-SCRAM.git
115

AUTHOR

117       David Golden <dagolden@cpan.org>
118

CONTRIBUTOR

120       David Golden <xdg@xdg.me>
121
123       This software is Copyright (c) 2014 by David Golden.
124
125       This is free software, licensed under:
126
127         The Apache License, Version 2.0, January 2004
128
129
130
131perl v5.32.1                      2021-01-26                  Authen::SCRAM(3)
Impressum