[Koha-bugs] [Bug 28420] Allow login via AzureAD OpenID-Connect

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 1 03:58:02 CEST 2021


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28420

--- Comment #14 from David Cook <dcook at prosentient.com.au> ---
Comment on attachment 121514
  --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=121514
AzureAD OAuth2 implementation based on the existing implementation for Google

Review of attachment 121514:
 --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=28420&attachment=121514)
-----------------------------------------------------------------

Technically, a lot of this code should be put into a module rather than a
script, but I know that you were basing your work on Nicholas's and his made it
into Koha, so I don't think we can require you to put it into a module with
unit tests.

::: opac/svc/auth/azureadopenidconnect
@@ +48,5 @@
> +
> +my $tenantID = C4::Context->preference('AzureADOAuth2TenantID');
> +my $authority= "https://login.microsoftonline.com/${tenantID}/v2.0";
> +my $discoveryDocURL = "${authority}/.well-known/openid-configuration";
> +warn $discoveryDocURL;

This debugging code needs to be removed.

@@ +253,5 @@
> +    my $prompt = $query->param('reauthenticate') // q{};
> +    if ( $authendpoint eq q{} ) {
> +        loginfailed( $query, 'Unable to discover authorisation endpoint.' );
> +    }
> +    my $authorisationurl =

This isn't a blocker, but I'd suggest using the URI Perl module for creating
this URL. I find it a lot nicer to work with than trying to concatenate
together a big URL string. https://metacpan.org/pod/URI

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list