|
Lines 19-27
Link Here
|
| 19 |
# |
19 |
# |
| 20 |
# |
20 |
# |
| 21 |
# Basic OAuth2/OpenID Connect authentication for google goes like this |
21 |
# Basic OAuth2/OpenID Connect authentication for google goes like this |
| 22 |
# First: |
|
|
| 23 |
# get your clientid, clientsecret from google. At this stage, tell |
| 24 |
# google that your redirect url is /cgi-bin/koha/svc/oauthlogin |
| 25 |
# |
22 |
# |
| 26 |
# The first thing that happens when this script is called is |
23 |
# The first thing that happens when this script is called is |
| 27 |
# that one gets redirected to an authentication url from google |
24 |
# that one gets redirected to an authentication url from google |
|
Lines 32-41
Link Here
|
| 32 |
# round-trip back to google to decrypt. Finally, we can extract |
29 |
# round-trip back to google to decrypt. Finally, we can extract |
| 33 |
# the email address from this. |
30 |
# the email address from this. |
| 34 |
# |
31 |
# |
| 35 |
# There is some room for improvement here. In particular, Google |
|
|
| 36 |
# recommends verifying and decrypting the id_token locally, which |
| 37 |
# means caching some information and updating it daily. But that |
| 38 |
# would make things a lot faster |
| 39 |
|
32 |
|
| 40 |
use Modern::Perl; |
33 |
use Modern::Perl; |
| 41 |
use CGI qw ( -utf8 escape ); |
34 |
use CGI qw ( -utf8 escape ); |
| 42 |
- |
|
|