Skip to content

Commit

Permalink
fix #563 - set the session store to JEESessionStore.INSTANCE
Browse files Browse the repository at this point in the history
  • Loading branch information
jdaugherty committed Dec 13, 2024
1 parent 861d998 commit b935faf
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import org.pac4j.core.client.IndirectClient
import org.pac4j.core.context.WebContext
import org.pac4j.core.credentials.Credentials
import org.pac4j.core.profile.UserProfile
import org.pac4j.jee.context.session.JEESessionStore
import org.springframework.security.core.authority.SimpleGrantedAuthority
import org.springframework.security.core.context.SecurityContextHolder

Expand Down Expand Up @@ -75,10 +76,10 @@ class RestOauthService {

UserProfile getProfile(String provider, WebContext context) {
IndirectClient client = getClient(provider)
Credentials credentials = client.getCredentials(context, null).orElse(null)
Credentials credentials = client.getCredentials(context, JEESessionStore.INSTANCE).orElse(null)

log.debug "Querying provider to fetch User ID"
client.getUserProfile(credentials, context, null).orElse(null)
client.getUserProfile(credentials, context, JEESessionStore.INSTANCE).orElse(null)
}

OauthUser getOauthUser(String provider, UserProfile profile) {
Expand Down

0 comments on commit b935faf

Please sign in to comment.