Skip to content

Commit c42dc30

Browse files
committedJul 9, 2023
adding an extra field
1 parent 53a0553 commit c42dc30

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
 

‎dist.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ author = Vikas N Kumar <vikas@cpan.org>
33
license = Perl_5
44
copyright_holder = Vikas N Kumar
55
copyright_year = 2019
6-
version = 0.04
6+
version = 0.05
77

88
[GatherDir]
99
exclude_filename = cpanfile

‎lib/Mojolicious/Plugin/Web/Auth/Site/LinkedIn.pm

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ has response_type => 'code';
1111
has scope => 'r_liteprofile r_emailaddress';
1212
has user_info => 1;
1313
has user_info_url => 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))';
14+
has user_more_info_url => 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))';
1415
has authorize_header => 'Bearer';
1516

1617
sub moniker {'linkedin'}
@@ -58,4 +59,6 @@ __END__
5859
This module adds L<LinkedIn|https://developer.linkedin.com/docs/rest-api/> support to
5960
L<Mojolicious::Plugin::Web::Auth>.
6061
62+
The only extra URL option is the C<user_more_info_url> which the user can use to do a L<Mojo::UserAgent> call to with the access token as a parameter, to get the other info such as profile image and first or last name. This URL can also be modified by the user to retrieve extra fields. For more details refer to the L<LinkedIn API|https://developer.linkedin.com/docs/rest-api/>.
63+
6164
=cut

0 commit comments

Comments
 (0)
Please sign in to comment.