1Net::OpenID::IndirectMeUssseargeC(o3n)tributed Perl DocuNmeetn:t:aOtpieonnID::IndirectMessage(3)
2
3
4

NAME

6       Net::OpenID::IndirectMessage - Class representing a collection of
7       namespaced arguments
8

VERSION

10       version 1.20
11

DESCRIPTION

13       This class acts as an abstraction layer over a collection of flat URL
14       arguments which supports namespaces as defined by the OpenID Auth 2.0
15       specification.
16
17       It also recognises when it is given OpenID 1.1 non-namespaced arguments
18       and acts as if the relevant namespaces were present. In this case, it
19       only supports the basic OpenID 1.1 arguments and the extension
20       arguments for Simple Registration.
21
22       This class can operate on a normal hashref, a CGI object or any object
23       with a "param" method that behaves similarly (Apache::Request,
24       Apache2::Request, Mojo::Parameters,...), an Apache object, a
25       Plack::Request object, or an arbitrary "CODE" ref that when given a key
26       name as its first parameter and returns a value and if given no
27       arguments returns a list of all keys present.
28
29       If you pass in a hashref or a coderef it is your responsibility as the
30       caller to check the HTTP request method and pass in the correct set of
31       arguments.  For the other kinds of objects, this module will do the
32       right thing automatically.
33

SYNOPSIS

35           use Net::OpenID::IndirectMessage;
36
37           # Pass in something suitable for the underlying flat dictionary.
38           # Will return an instance if the request arguments can be understood
39           # as a supported OpenID Message format.
40           # Will return undef if this doesn't seem to be an OpenID Auth message.
41           # Will croak if the $argumenty_thing is not of a suitable type.
42           my $args = Net::OpenID::IndirectMessage->new($argumenty_thing);
43
44           # Determine which protocol version the message is using.
45           # Currently this can be either 1 for 1.1 or 2 for 2.0.
46           # Expect larger numbers for other versions in future.
47           # Most callers don't really need to care about this.
48           my $version = $args->protocol_version();
49
50           # Get a core argument value ("openid.mode")
51           my $mode = $args->get("mode");
52
53           # Get an extension argument value
54           my $nickname = $args->get_ext("http://openid.net/extensions/sreg/1.1", "nickname");
55
56           # Get hashref of all arguments in a given namespace
57           my $sreg = $args->get_ext("http://openid.net/extensions/sreg/1.1");
58
59       Most of the time callers won't need to use this class directly, but
60       will instead access it through a Net::OpenID::Consumer instance.
61

METHODS

63       protocol_version
64           Currently returns 1 or 2, according as this is an OpenID 1.0/1.1 or
65           an OpenID 2.0 message.
66
67       has_ext
68           Takes an extension namespace and returns true if the named
69           extension is used in this message.
70
71       get_ext
72           Takes an extension namespace and an optional parameter name,
73           returns the parameter value, or if no parameter given, the
74           parameter value.
75
76
77
78perl v5.34.0                      2021-07-22   Net::OpenID::IndirectMessage(3)
Impressum