Koha::Auth::Identity::Provider - Koha Auth Provider Object class
my $domains = $provider->domains;
Returns the related Koha::Auth::Identity::Provider::Domains iterator.
my $config = $provider->get_config;
Returns a hashref containing the configuration parameters for the provider.
# OAuth
$provider->set_config(
{
key => 'APP_ID',
secret => 'SECRET_KEY',
authorize_url => 'https://provider.example.com/auth',
token_url => 'https://provider.example.com/token',
}
);
# OIDC
$provider->set_config(
{
key => 'APP_ID',
secret => 'SECRET_KEY',
well_known_url => 'https://login.microsoftonline.com/tenant-id/v2.0/.well-known/openid-configuration',
}
);
This method stores the passed config in JSON format.
my $mapping = $provider->get_mapping;
Returns a hashref containing the attribute mapping for the provider.
$provider->mapping( $mapping );
This method stores the passed mappings in JSON format.
my $upgraded_object = $provider->upgrade_class
Returns a new instance of the object, with the right class.
my $json = $provider->to_api;
Overloaded method that returns a JSON representation of the Koha::Auth::Identity::Provider object, suitable for API output.
my $mapping = Koha::Auth::Identity::Provider::protocol_to_class_mapping
Internal method that returns a mapping between protocol codes and implementing classes. To be used by upgrade_class.
Stub method for raising exceptions on invalid protocols.