File: Client.pod

package info (click to toggle)
libnet-oauth2-perl 0.67-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 224 kB
  • sloc: perl: 760; makefile: 7
file content (87 lines) | stat: -rw-r--r-- 2,084 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
=encoding utf8

=head1 NAME

Net::OAuth2::Client - client for OAuth2 access, deprecated interface

=head1 SYNOPSIS

   # This module provides the deprecated interface
   my $client = Net::OAuth2::Client->new(
       $client_id,
       $client_secret,
       site => $site
   );

   my $auth = $client->web_server(
       redirect_path => "$site/auth/facebook/callback"
   );

   # interface since v0.50
   my $client = Net::OAuth2::Profile::WebServer->new(
       client_id     => $client_id,
       client_secret => $client_secret,
       site          => $site
       redirect_uri  => "$site/auth/facebook/callback"
   );

=head1 DESCRIPTION

This module is kept to translate the expired interface into the new
interface.

=head1 METHODS

=head2 Constructors

=over 4

=item Net::OAuth2::Client-E<gt>B<new>($id, $secret, %options)

This object collects all %options to be used when L<web_server()|Net::OAuth2::Client/"Actions"> creates
a profile.

The $id will be translated into OPTION C<client_id>, and $secret to
C<client_secret>.

=back

=head2 Accessors

=over 4

=item $obj-E<gt>B<id>()

=item $obj-E<gt>B<secret>()

=item $obj-E<gt>B<user_agent>()

=back

=head2 Actions

=over 4

=item $obj-E<gt>B<password>(%options)

Create a L<Net::OAuth2::Profile::Password|Net::OAuth2::Profile::Password> object, based on all options
passed with L<new()|Net::OAuth2::Client/"Constructors">, overruled/extended by the %options passed here.

=item $obj-E<gt>B<web_server>(%options)

Create a L<Net::OAuth2::Profile::WebServer|Net::OAuth2::Profile::WebServer> object, based on all options
passed with L<new()|Net::OAuth2::Client/"Constructors">, overruled/extended by the %options passed here.

=back

=head1 COPYRIGHTS

Copyrights 2013-2019 on the perl code and the related documentation
 by [Mark Overmeer <markov@cpan.org>] for SURFnet bv, The Netherlands.  For other contributors see L</Changes>.

Copyrights 2011-2012 by Keith Grennan.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://dev.perl.org/licenses/>