Bug 33708: Provide non-public endpoint for OAuth/OIDC for staff interface

This change fixes the definition for the non-public endpoint for the OAuth/OIDC
implementation.

It also uses the non-public endpoint for the staff interface UI.

Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
David Cook 2023-05-10 01:35:56 +00:00 committed by Tomas Cohen Arazi
parent dd512db60b
commit aae996e6bf
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
2 changed files with 3 additions and 1 deletions

View file

@ -50,7 +50,7 @@ sub get_providers {
if $interface eq 'intranet';
my $providers = Koha::Auth::Identity::Providers->search( { "domains.allow_$interface" => 1 }, { prefetch => 'domains' } );
my $base_url = ( $interface ne 'staff' ) ? "/api/v1/public/oauth/login" : "/api/v1/public/oauth/login";
my $base_url = ( $interface eq 'staff' ) ? "/api/v1/oauth/login" : "/api/v1/public/oauth/login";
my @urls;

View file

@ -281,6 +281,8 @@ paths:
$ref: ./paths/libraries.yaml#/~1libraries
"/libraries/{library_id}":
$ref: "./paths/libraries.yaml#/~1libraries~1{library_id}"
"/oauth/login/{provider_code}/{interface}":
$ref: ./paths/oauth.yaml#/~1oauth~1login~1{provider_code}~1{interface}
/oauth/token:
$ref: ./paths/oauth.yaml#/~1oauth~1token
/patrons: