Skip to content

Commit

Permalink
Merge pull request #564 from jdaugherty/5.0.x
Browse files Browse the repository at this point in the history
fix #563 - set the session store to JEESessionStore.INSTANCE
  • Loading branch information
jdaugherty authored Dec 16, 2024
2 parents 861d998 + b935faf commit 27603a1
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 27603a1

Please sign in to comment.