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

(-)a/Koha/REST/V1.pm (-6 / +10 lines)
Lines 135-146 sub startup { Link Here
135
    };
135
    };
136
136
137
    my $oauth_configuration = {};
137
    my $oauth_configuration = {};
138
    my $search_options = { protocol => [ "OIDC", "OAuth" ] };
138
    try {
139
    my $providers = Koha::Auth::Providers->search( $search_options );
139
        my $search_options = { protocol => [ "OIDC", "OAuth" ] };
140
140
        my $providers = Koha::Auth::Providers->search( $search_options );
141
    while(my $provider = $providers->next) {
141
        while(my $provider = $providers->next) {
142
        $oauth_configuration->{$provider->code} = decode_json($provider->config);
142
            $oauth_configuration->{$provider->code} = decode_json($provider->config);
143
        }
143
    }
144
    }
145
    catch {
146
        my $logger = Koha::Logger->get({ interface => 'api' });
147
        $logger->warn("Warning: Failed to fetch oauth configuration: " . $_);
148
    };
144
149
145
    $self->plugin( 'Koha::REST::Plugin::Pagination' );
150
    $self->plugin( 'Koha::REST::Plugin::Pagination' );
146
    $self->plugin( 'Koha::REST::Plugin::Query' );
151
    $self->plugin( 'Koha::REST::Plugin::Query' );
147
- 

Return to bug 31378