This one is caused by pointing pac4j-1.7.x based app at Google OAuth endpoint without Google+ API being enabled. (Unlike the pac4j-1.4.x (with it's old Google OAuth endpoint), pac4j-1.7.x (with it's new Google OAuth endpoint) does require Google+ API to be enabled in the Google OAuth app configuration in https://console.developers.google.comAPIs&auth -> APIs).
2015-09-22 06:29:40,587 ERROR [org.pac4j.oauth.client.BaseOAuthClient] - <Failed to get data, code : 403 / body : {
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "accessNotConfigured",
"message": "Access Not Configured. The API (Google+ API) is not enabled for your project. Please use the Google Developers Console to update your configuration.",
"extendedHelp": "https://console.developers.google.com"
}
],
"code": 403,
"message": "Access Not Configured. The API (Google+ API) is not enabled for your project. Please use the Google Developers Console to update your configuration."
}
}
>
The Google OAuth endpoint URLs are diff (changed between pac4j-1.4.x and pac4j-1.7.x): pac4j-1.4.x:
That is the reason why a Google OAuth app setup for pac4j-1.4.x does NOT simply/automatically work with with pac4j-1.7.x.
The last problem/error was caused by the fact that the internal representation/structure of org.pac4j.oauth.profile.google2.Google2Profile changed between pac4j-1.4.x and pac4j-1.7.x, and the parsing/extraction of email, first name, last name fields failed:
The moral of the story: create, resp. add automated (most likely REST based) test, that will be run as part of the travis-ci build, so it will automatically pick up this type of annoyances ASAP.
errors/exceptions:
This one is caused by pointing a
pac4j-1.7.x
based app atpac4j-1.4.x
Google OAuth endpoint URL:This one is caused by pointing
pac4j-1.7.x
based app at Google OAuth endpoint without Google+ API being enabled. (Unlike thepac4j-1.4.x
(with it's old Google OAuth endpoint),pac4j-1.7.x
(with it's new Google OAuth endpoint) does require Google+ API to be enabled in the Google OAuth app configuration in https://console.developers.google.comAPIs&auth -> APIs
).The Google OAuth endpoint URLs are diff (changed between pac4j-1.4.x and pac4j-1.7.x):
pac4j-1.4.x:
pac4j-1.7.x:
That is the reason why a Google OAuth app setup for
pac4j-1.4.x
does NOT simply/automatically work with withpac4j-1.7.x
.The last problem/error was caused by the fact that the internal representation/structure of
org.pac4j.oauth.profile.google2.Google2Profile
changed betweenpac4j-1.4.x
andpac4j-1.7.x
, and the parsing/extraction of email, first name, last name fields failed:The moral of the story: create, resp. add automated (most likely REST based) test, that will be run as part of the travis-ci build, so it will automatically pick up this type of annoyances ASAP.