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