Well, it looks like I need to update my version of Net::OAuth2 since last
version uses
my $basic = encode_base64 "$params->{client_id}:$params->{client_secret}"
, ''; # no new-lines!
And that works fine.
Sorry, I should have checked first.
On 26 October 2015 at 10:18, Bugs in Net-OAuth2 via RT <
bug-Net-OAuth2@rt.cpan.org> wrote:
Show quoted text>
> Greetings,
>
> This message has been automatically generated in response to the
> creation of a trouble ticket regarding:
> "Net::OAuth2::Profile::WebServer base64 vs base64url",
> a summary of which appears below.
>
> There is no need to reply to this message right now. Your ticket has been
> assigned an ID of [rt.cpan.org #107987]. Your ticket is accessible
> on the web at:
>
>
https://rt.cpan.org/Ticket/Display.html?id=107987
>
> Please include the string:
>
> [rt.cpan.org #107987]
>
> in the subject line of all future correspondence about this issue. To do
> so,
> you may reply to this message.
>
> Thank you,
> bug-Net-OAuth2@rt.cpan.org
>
> -------------------------------------------------------------------------
> Hello,
>
> I'm trying to authenticate users using Google and I'm getting and error
> when I call get_access_token:
>
> {
> '_protocol' => 'HTTP/1.1',
> '_content' => '{
> "error": "invalid_request",
> "error_description": "Basic Authorization header not in Base64
> encoding."
> }
> ',
> '_rc' => '400',
> '_msg' => 'Bad Request',
> }
>
> If I just edit Net::OAuth2::Profile::WebServer and replace encode_base64 by
> encode_base64url then everything works.
>
> Is this a bug or I am doing something wrong?
>
>
> Best Regards,
> David EG
>