Add default scopes to authorization request
Change-Id: I8a757e02063fcc1da750c1dec96567bd4b79beb5
diff --git a/Changes b/Changes
index 5c809a8..38f2541 100755
--- a/Changes
+++ b/Changes
@@ -8,7 +8,9 @@
- Improve redirection on all authorization calls. (diewald)
- Redirect-URIs are required to be absolute
by newer versions of Kustvakt. (diewald)
-
+ - Newer versions of Kustvakt disabled default
+ scope on authorization requests. (diewald)
+
0.49 2023-02-23
- Introduce conllu2korapxml command via plugin. (diewald)
- Introduce korapxml2conllu command via plugin. (diewald)
diff --git a/lib/Kalamar/Plugin/Auth.pm b/lib/Kalamar/Plugin/Auth.pm
index 4cc2a9e..160c533 100644
--- a/lib/Kalamar/Plugin/Auth.pm
+++ b/lib/Kalamar/Plugin/Auth.pm
@@ -1013,7 +1013,7 @@
cb => sub {
my $c = shift;
_set_no_cache($c->res->headers);
-
+
unless ($c->auth->token) {
#TODO: Handle authorization (forward to Login for example)
return $c->render(
@@ -1629,7 +1629,8 @@
$c->auth->new_token_p(
client_id => $client_id,
redirect_uri => $redirect_url,
- # TODO: State, scope
+ # TODO: State
+ scope => 'search match_info',
)->then(
sub {
my ($loc, $client_id, $redirect_url, $code, $scope, $name) = @_;