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

(-)a/Koha/Auth/Identity/Provider/SAML2.pm (+60 lines)
Line 0 Link Here
1
package Koha::Auth::Identity::Provider::SAML2;
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::SAML2 - SAML2/Shibboleth identity provider class
25
26
=head1 API
27
28
=head2 Class methods
29
30
=head3 new
31
32
    my $saml2 = Koha::Auth::Identity::Provider::SAML2->new( \%{params} );
33
34
Overloaded constructor that sets protocol to 'SAML2'.
35
36
=cut
37
38
sub new {
39
    my ( $class, $params ) = @_;
40
41
    $params->{protocol} = 'SAML2';
42
43
    return $class->SUPER::new($params);
44
}
45
46
=head2 Internal methods
47
48
=head3 mandatory_config_attributes
49
50
SAML2 providers are configured at the web-server level (e.g. mod_shib).
51
Koha stores optional behavioural settings in C<config> (autocreate, sync, welcome)
52
but none are mandatory.
53
54
=cut
55
56
sub mandatory_config_attributes {
57
    return ();
58
}
59
60
1;
(-)a/Koha/Auth/Identity/Providers.pm (-1 / +2 lines)
Lines 23-28 use Koha::Auth::Identity::Provider; Link Here
23
use Koha::Auth::Identity::Provider::Hostnames;
23
use Koha::Auth::Identity::Provider::Hostnames;
24
use Koha::Auth::Identity::Provider::OAuth;
24
use Koha::Auth::Identity::Provider::OAuth;
25
use Koha::Auth::Identity::Provider::OIDC;
25
use Koha::Auth::Identity::Provider::OIDC;
26
use Koha::Auth::Identity::Provider::SAML2;
26
27
27
use base qw(Koha::Objects);
28
use base qw(Koha::Objects);
28
29
Lines 95-100 sub _polymorphic_map { Link Here
95
    return {
96
    return {
96
        OAuth => 'Koha::Auth::Identity::Provider::OAuth',
97
        OAuth => 'Koha::Auth::Identity::Provider::OAuth',
97
        OIDC  => 'Koha::Auth::Identity::Provider::OIDC',
98
        OIDC  => 'Koha::Auth::Identity::Provider::OIDC',
99
        SAML2 => 'Koha::Auth::Identity::Provider::SAML2',
98
    };
100
    };
99
}
101
}
100
102
101
- 

Return to bug 39224