I'm using SparkJava and org.pac4j:spark-pac4j:1.2.3
With the simplest implementation I have logged in via Google using OAuth2. It is using The SparkWebContext, an extension of the J2EContext. It also used the HashSessionIdManager.
Google returns the UserProfile, which contains the access_token.
After a period (I think 20 or 30 mins) the access_token in the Profile is no longer valid. EG.
returns
{
error: "invalid_token",
error_description: "Invalid Value"
}
However, when I browse to my protectedIndex page I'm not, as expected, asked to authenticate again.
What basic concept have I failed to understand?
PS. Is there a single page version of the documentation available. This would greatly aid searching for concepts like this.