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

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

Return to bug 31378