{
    "mode": "perldoc",
    "parameter": "Authen::SCRAM",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/Authen%3A%3ASCRAM/json",
    "generated": "2026-06-12T11:28:05Z",
    "synopsis": "use Authen::SCRAM::Client;\nuse Authen::SCRAM::Server;\nuse Try::Tiny;\n### CLIENT SIDE ###\n$client = Authen::SCRAM::Client->new(\nusername => 'johndoe',\npassword => 'trustno1',\n);\ntry {\n$clientfirst = $client->firstmsg();\n# send to server and get server-first-message\n$clientfinal = $client->finalmsg( $serverfirst );\n# send to server and get server-final-message\n$client->validate( $serverfinal );\n}\ncatch {\ndie \"Authentication failed!\"\n};\n### SERVER SIDE ###\n$server = Authen::SCRAM::Server->new(\ncredentialcb => \\&getcredentials,\n);\n$username = try {\n# get client-first-message\n$serverfirst = $server->firstmsg( $clientfirst );\n# send to client and get client-final-message\n$serverfinal = $server->finalmsg( $clientfinal );\n# send to client\nreturn $server->authorizationid; # returns valid username\n}\ncatch {\ndie \"Authentication failed!\"\n};",
    "sections": {
        "NAME": {
            "content": "Authen::SCRAM - Salted Challenge Response Authentication Mechanism (RFC 5802)\n",
            "subsections": []
        },
        "VERSION": {
            "content": "version 0.011\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use Authen::SCRAM::Client;\nuse Authen::SCRAM::Server;\nuse Try::Tiny;\n\n### CLIENT SIDE ###\n\n$client = Authen::SCRAM::Client->new(\nusername => 'johndoe',\npassword => 'trustno1',\n);\n\ntry {\n$clientfirst = $client->firstmsg();\n\n# send to server and get server-first-message\n\n$clientfinal = $client->finalmsg( $serverfirst );\n\n# send to server and get server-final-message\n\n$client->validate( $serverfinal );\n}\ncatch {\ndie \"Authentication failed!\"\n};\n\n### SERVER SIDE ###\n\n$server = Authen::SCRAM::Server->new(\ncredentialcb => \\&getcredentials,\n);\n\n$username = try {\n# get client-first-message\n\n$serverfirst = $server->firstmsg( $clientfirst );\n\n# send to client and get client-final-message\n\n$serverfinal = $server->finalmsg( $clientfinal );\n\n# send to client\n\nreturn $server->authorizationid; # returns valid username\n}\ncatch {\ndie \"Authentication failed!\"\n};\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The modules in this distribution implement the Salted Challenge Response Authentication\nMechanism (SCRAM) from RFC 5802.\n\nSee Authen::SCRAM::Client and Authen::SCRAM::Server for usage details.\n",
            "subsections": []
        },
        "SUPPORT": {
            "content": "Bugs / Feature Requests\nPlease report any bugs or feature requests through the issue tracker at\n<https://github.com/dagolden/Authen-SCRAM/issues>. You will be notified automatically of any\nprogress on your issue.\n",
            "subsections": [
                {
                    "name": "Source Code",
                    "content": "This is open source software. The code repository is available for public review and\ncontribution under the terms of the license.\n\n<https://github.com/dagolden/Authen-SCRAM>\n\ngit clone https://github.com/dagolden/Authen-SCRAM.git\n"
                }
            ]
        },
        "AUTHOR": {
            "content": "David Golden <dagolden@cpan.org>\n",
            "subsections": []
        },
        "CONTRIBUTOR": {
            "content": "David Golden <xdg@xdg.me>\n",
            "subsections": []
        },
        "COPYRIGHT AND LICENSE": {
            "content": "This software is Copyright (c) 2014 by David Golden.\n\nThis is free software, licensed under:\n\nThe Apache License, Version 2.0, January 2004\n",
            "subsections": []
        }
    },
    "summary": "Authen::SCRAM - Salted Challenge Response Authentication Mechanism (RFC 5802)",
    "flags": [],
    "examples": [],
    "see_also": []
}