View | Details | Raw Unified | Return to bug 40596
Collapse All | Expand All

(-)a/Koha/Auth/Identity/Provider/CAS.pm (+58 lines)
Line 0 Link Here
1
package Koha::Auth::Identity::Provider::CAS;
2
3
# This file is part of Koha.
4
#
5
# Koha is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License as published by
7
# the Free Software Foundation; either version 3 of the License, or
8
# (at your option) any later version.
9
#
10
# Koha is distributed in the hope that it will be useful, but
11
# WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
14
#
15
# You should have received a copy of the GNU General Public License
16
# along with Koha; if not, see <https://www.gnu.org/licenses>.
17
18
use Modern::Perl;
19
20
use base qw(Koha::Auth::Identity::Provider);
21
22
=head1 NAME
23
24
Koha::Auth::Identity::Provider::CAS - CAS identity provider class
25
26
=head1 API
27
28
=head2 Class methods
29
30
=head3 new
31
32
    my $cas = Koha::Auth::Identity::Provider::CAS->new( \%{params} );
33
34
Overloaded constructor that sets protocol to 'CAS'.
35
36
=cut
37
38
sub new {
39
    my ( $class, $params ) = @_;
40
41
    $params->{protocol} = 'CAS';
42
43
    return $class->SUPER::new($params);
44
}
45
46
=head2 Internal methods
47
48
=head3 mandatory_config_attributes
49
50
Returns a list of the mandatory config entries for the protocol.
51
52
=cut
53
54
sub mandatory_config_attributes {
55
    return qw(server_url);
56
}
57
58
1;
(-)a/Koha/Auth/Identity/Providers.pm (-1 / +2 lines)
Lines 21-26 use Modern::Perl; Link Here
21
21
22
use Koha::Auth::Identity::Provider;
22
use Koha::Auth::Identity::Provider;
23
use Koha::Auth::Identity::Provider::Hostnames;
23
use Koha::Auth::Identity::Provider::Hostnames;
24
use Koha::Auth::Identity::Provider::CAS;
24
use Koha::Auth::Identity::Provider::OAuth;
25
use Koha::Auth::Identity::Provider::OAuth;
25
use Koha::Auth::Identity::Provider::OIDC;
26
use Koha::Auth::Identity::Provider::OIDC;
26
use Koha::Auth::Identity::Provider::SAML2;
27
use Koha::Auth::Identity::Provider::SAML2;
Lines 94-99 Return the mapping from protocol value to implementing class name Link Here
94
95
95
sub _polymorphic_map {
96
sub _polymorphic_map {
96
    return {
97
    return {
98
        CAS   => 'Koha::Auth::Identity::Provider::CAS',
97
        OAuth => 'Koha::Auth::Identity::Provider::OAuth',
99
        OAuth => 'Koha::Auth::Identity::Provider::OAuth',
98
        OIDC  => 'Koha::Auth::Identity::Provider::OIDC',
100
        OIDC  => 'Koha::Auth::Identity::Provider::OIDC',
99
        SAML2 => 'Koha::Auth::Identity::Provider::SAML2',
101
        SAML2 => 'Koha::Auth::Identity::Provider::SAML2',
100
- 

Return to bug 40596