Bugzilla – Attachment 75032 Details for
Bug 20402
OAuth2 client credentials grant for REST API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20402: Add missing POD
Bug-20402-Add-missing-POD.patch (text/plain), 4.91 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-05-03 19:06:40 UTC
(
hide
)
Description:
Bug 20402: Add missing POD
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-05-03 19:06:40 UTC
Size:
4.91 KB
patch
obsolete
>From 5a7185a2eca8154a77a64f4e52af5b39ea3ff519 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 17 Apr 2018 16:23:56 -0300 >Subject: [PATCH] Bug 20402: Add missing POD > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/OAuth.pm | 52 ++++++++++++++++++++++++++++++++++++++- > Koha/OAuthAccessToken.pm | 27 ++++++++++++++++++++ > Koha/OAuthAccessTokens.pm | 39 ++++++++++++++++++++++++++--- > 3 files changed, 114 insertions(+), 4 deletions(-) > >diff --git a/Koha/OAuth.pm b/Koha/OAuth.pm >index 6966570502..e322206925 100644 >--- a/Koha/OAuth.pm >+++ b/Koha/OAuth.pm >@@ -1,8 +1,39 @@ > package Koha::OAuth; > >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ > use Modern::Perl; >+ > use Koha::OAuthAccessTokens; >-use Koha::OAuthAccessToken; >+ >+=head1 NAME >+ >+Koha::OAuth - Koha library for OAuth2 callbacks >+ >+=head1 API >+ >+=head2 Class methods >+ >+=head3 config >+ >+ my $config = Koha::OAuth->config; >+ >+Returns a hashref containing the callbacks Net::OAuth2::AuthorizationServer requires >+ >+=cut > > sub config { > return { >@@ -12,6 +43,13 @@ sub config { > }; > } > >+=head3 _verify_client_db >+ >+A callback to verify if the client asking for authorization is known to the authorization server >+and allowed to get authorization. >+ >+=cut >+ > sub _verify_client_cb { > my (%args) = @_; > >@@ -30,6 +68,12 @@ sub _verify_client_cb { > return (1, undef, []); > } > >+=head3 _store_access_token_cb >+ >+A callback to store the generated access tokens. >+ >+=cut >+ > sub _store_access_token_cb { > my ( %args ) = @_; > >@@ -46,6 +90,12 @@ sub _store_access_token_cb { > return; > } > >+=head3 _verify_access_token_cb >+ >+A callback to verify the access token. >+ >+=cut >+ > sub _verify_access_token_cb { > my (%args) = @_; > >diff --git a/Koha/OAuthAccessToken.pm b/Koha/OAuthAccessToken.pm >index c322ea645a..0cb15e3824 100644 >--- a/Koha/OAuthAccessToken.pm >+++ b/Koha/OAuthAccessToken.pm >@@ -1,9 +1,36 @@ > package Koha::OAuthAccessToken; > >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ > use Modern::Perl; > > use base qw(Koha::Object); > >+=head1 NAME >+ >+Koha::OauthAccessToken - Koha OAuth2 access token object class >+ >+=head1 API >+ >+=head2 Internal methods >+ >+=head3 _type >+ >+=cut >+ > sub _type { > return 'OauthAccessToken'; > } >diff --git a/Koha/OAuthAccessTokens.pm b/Koha/OAuthAccessTokens.pm >index 12dbf4ab23..04876273d7 100644 >--- a/Koha/OAuthAccessTokens.pm >+++ b/Koha/OAuthAccessTokens.pm >@@ -1,15 +1,48 @@ > package Koha::OAuthAccessTokens; > >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it under the >+# terms of the GNU General Public License as published by the Free Software >+# Foundation; either version 3 of the License, or (at your option) any later >+# version. >+# >+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY >+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+# A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License along >+# with Koha; if not, write to the Free Software Foundation, Inc., >+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ > use Modern::Perl; > > use base qw(Koha::Objects); > >-sub object_class { >- return 'Koha::OAuthAccessToken'; >-} >+use Koha::OAuthAccessToken; >+ >+=head1 NAME >+ >+Koha::OauthAccessTokens - Koha OAuth2 access token objects class >+ >+=head1 API >+ >+=head2 Internal methods >+ >+=head3 _type >+ >+=cut > > sub _type { > return 'OauthAccessToken'; > } > >+=head3 object_class >+ >+=cut >+ >+sub object_class { >+ return 'Koha::OAuthAccessToken'; >+} >+ > 1; >-- >2.17.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20402
:
72865
|
72874
|
72886
|
72887
|
72888
|
72892
|
72893
|
72894
|
73086
|
73087
|
74009
|
74018
|
74050
|
74051
|
74069
|
74070
|
74088
|
74365
|
74366
|
74367
|
74368
|
74369
|
74380
|
74381
|
74382
|
74383
|
74384
|
74385
|
74386
|
74600
|
75026
|
75027
|
75028
|
75029
|
75030
|
75031
| 75032 |
75033
|
75189