@Test
    public void testExpirationWithExpiredToken() {
        final AccessToken token = new BearerAccessToken("token_value", -1, new Scope("scope"));
        val profile = new OidcProfile();
        profile.setAccessToken(token);
        profile.setTokenExpirationAdvance(0);
        assertTrue(profile.isExpired());
    }
If the token is expired, then the session is considered expired.
pac4j-oidc/src/test/java/org/pac4j/oidc/profile/OidcProfileTests.java