summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Henning Thorsen <jhthorsen@cpan.org>2021-02-17 08:33:39 +0900
committerJan Henning Thorsen <jhthorsen@cpan.org>2021-02-17 08:33:39 +0900
commit552b2d66bec6303caebfadc5bc4cdf74292335ff (patch)
tree2dcc7bd16ef26dc5eb1e6667bd532d520c295496
parentfd3c5f191dfd429babde2b90be3d185e3a2615a9 (diff)
Released version 1.59
- Fix invalid "=item" in documentation. - Compatible with Mojolicious 9.0 Contributor: Joel Berger
-rw-r--r--Changes4
-rw-r--r--Makefile.PL3
-rw-r--r--README.md8
-rw-r--r--lib/Mojolicious/Plugin/OAuth2.pm6
4 files changed, 12 insertions, 9 deletions
diff --git a/Changes b/Changes
index ecf24a8..a2bb1d1 100644
--- a/Changes
+++ b/Changes
@@ -1,7 +1,9 @@
Revision history for perl distribution Mojolicious-Plugin-OAuth2
-1.59 Not Released
+1.59 2021-02-17T08:33:17+0900
- Fix invalid "=item" in documentation.
+ - Compatible with Mojolicious 9.0
+ Contributor: Joel Berger
1.58 2019-07-03T14:22:38+0200
- Add new Oauth2 providers: instagram.com
diff --git a/Makefile.PL b/Makefile.PL
index ada6001..08b607d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -8,8 +8,9 @@ my %WriteMakefileArgs = (
ABSTRACT_FROM => 'lib/Mojolicious/Plugin/OAuth2.pm',
VERSION_FROM => 'lib/Mojolicious/Plugin/OAuth2.pm',
EXE_FILES => [qw()],
+ OBJECT => '',
BUILD_REQUIRES => {},
- TEST_REQUIRES => {'Test::More' => '0.88'},
+ TEST_REQUIRES => {'Test::More' => '0.88'},
PREREQ_PM => {'IO::Socket::SSL' => '1.94', 'Mojolicious' => '7.53'},
META_MERGE => {
'dynamic_config' => 0,
diff --git a/README.md b/README.md
index 3f5e963..9cb0744 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ popular providers, but you can add your own easily as well.
Note that OAuth2 requires https, so you need to have the optional Mojolicious
dependency required to support it. Run the command below to check if
-[IO::Socket::SSL](https://metacpan.org/pod/IO::Socket::SSL) is installed.
+[IO::Socket::SSL](https://metacpan.org/pod/IO%3A%3ASocket%3A%3ASSL) is installed.
$ mojo version
@@ -69,7 +69,7 @@ values are configuration for each provider. Here is a complete example:
},
};
-To make it a bit easier, [Mojolicious::Plugin::OAuth2](https://metacpan.org/pod/Mojolicious::Plugin::OAuth2) has already
+To make it a bit easier, [Mojolicious::Plugin::OAuth2](https://metacpan.org/pod/Mojolicious%3A%3APlugin%3A%3AOAuth2) has already
values for `authorize_url` and `token_url` for the following providers:
- dailymotion
@@ -160,7 +160,7 @@ The code above will add two new routes to your application:
$url = $c->oauth2->auth_url($provider => \%args);
-Returns a [Mojo::URL](https://metacpan.org/pod/Mojo::URL) object which contain the authorize URL. This is
+Returns a [Mojo::URL](https://metacpan.org/pod/Mojo%3A%3AURL) object which contain the authorize URL. This is
useful if you want to add the authorize URL as a link to your webpage
instead of doing a redirect like ["oauth2.get\_token"](#oauth2-get_token) does. `%args` is optional,
but can contain:
@@ -245,7 +245,7 @@ when [registering](#synopsis) the plugin.
$promise = $c->oauth2->get_token_p($provider_name => \%args);
-Same as ["oauth2.get\_token"](#oauth2-get_token), but returns a [Mojo::Promise](https://metacpan.org/pod/Mojo::Promise). See ["SYNOPSIS"](#synopsis)
+Same as ["oauth2.get\_token"](#oauth2-get_token), but returns a [Mojo::Promise](https://metacpan.org/pod/Mojo%3A%3APromise). See ["SYNOPSIS"](#synopsis)
for example usage.
## oauth2.providers
diff --git a/lib/Mojolicious/Plugin/OAuth2.pm b/lib/Mojolicious/Plugin/OAuth2.pm
index e1504fc..7ca424d 100644
--- a/lib/Mojolicious/Plugin/OAuth2.pm
+++ b/lib/Mojolicious/Plugin/OAuth2.pm
@@ -6,7 +6,7 @@ use Mojo::UserAgent;
use Carp 'croak';
use strict;
-our $VERSION = '1.58';
+our $VERSION = '1.59';
has providers => sub {
return {
@@ -94,8 +94,8 @@ sub _get_authorize_url {
$authorize_url = Mojo::URL->new($provider_args->{authorize_url});
$authorize_url->host($args->{host}) if exists $args->{host};
$authorize_url->query->append(client_id => $provider_args->{key}, redirect_uri => $args->{redirect_uri});
- $authorize_url->query->append(scope => $args->{scope}) if defined $args->{scope};
- $authorize_url->query->append(state => $args->{state}) if defined $args->{state};
+ $authorize_url->query->append(scope => $args->{scope}) if defined $args->{scope};
+ $authorize_url->query->append(state => $args->{state}) if defined $args->{state};
$authorize_url->query($args->{authorize_query}) if exists $args->{authorize_query};
$authorize_url;
}