Net::Op...tration(3)

Okay bestie, welcome to Net::Op...tration(3) β€” straight out of the User Contributed Perl Documentation collection. That's the manual-name sitch folded in right at the top, and now we're getting into the good stuff. πŸ’–

🌸 NAME 🌸

This one is Net::OpenID::Extension::SimpleRegistration, and it's all about Support for the Simple Registration extension (SREG). Slay. πŸŽ€

πŸ’« VERSION πŸ’«

version 1.20 β€” periodt. ✨

πŸ¦‹ SYNOPSIS πŸ¦‹

Okay so picture this: first you're in Consumer land, and you're adding the extension request like this:

my $sreg_req = $claimed_identity->add_extension_request('Net::OpenID::Extension::SimpleRegistration', (
    required_fields => [qw(nickname email)],
    optional_fields => [qw(country language timezone)],
    policy_url => "http://example.com/policy.html",
));

Then, in Server, when you're handling the authentication request, it looks like this β€” comments and all, because the page literally says them:

# FIXME: What object do we have in ::Server that can hold this method?
my $sreg_req = $something->get_extension_request('Net::OpenID::Extension::SimpleRegistration');
my $required_fields = $sreg_req->required_fields;
my $optional_fields = $sreg_req->optional_fields;
my $policy_url = $sreg_req->policy_url;

When Server sends back its response, it's giving:

# FIXME: Again, what object do we have to hold this method?
my $sreg_res = $something->add_extension_response('Net::OpenID::Extension::SimpleRegistration', (
    nickname => $nickname,
    email => $email,
));

And finally, when you're back in Consumer receiving the response, you grab the values like:

my $sreg_res = $verified_identity->get_extension_response('Net::OpenID::Extension::SimpleRegistration');
my $nickname = $sreg_res->nickname;
my $email = $sreg_res->email;
my $country = $sreg_res->country;
my $language = $sreg_res->language;
my $timezone = $sreg_res->timezone;

And that's the page, bestie! 🫢 This one is signed with perl v5.42.0, dated 2016-02-13, and filed under the Net::Op...tration(3) name. Byeee! πŸ’–βœ¨

πŸ“¦ where this page comes from