Skip to content
This repository was archived by the owner on Feb 28, 2025. It is now read-only.

Commit b935faf

Browse files
committed
fix #563 - set the session store to JEESessionStore.INSTANCE
1 parent 861d998 commit b935faf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

spring-security-rest/grails-app/services/grails/plugin/springsecurity/rest/RestOauthService.groovy

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import org.pac4j.core.client.IndirectClient
3131
import org.pac4j.core.context.WebContext
3232
import org.pac4j.core.credentials.Credentials
3333
import org.pac4j.core.profile.UserProfile
34+
import org.pac4j.jee.context.session.JEESessionStore
3435
import org.springframework.security.core.authority.SimpleGrantedAuthority
3536
import org.springframework.security.core.context.SecurityContextHolder
3637

@@ -75,10 +76,10 @@ class RestOauthService {
7576

7677
UserProfile getProfile(String provider, WebContext context) {
7778
IndirectClient client = getClient(provider)
78-
Credentials credentials = client.getCredentials(context, null).orElse(null)
79+
Credentials credentials = client.getCredentials(context, JEESessionStore.INSTANCE).orElse(null)
7980

8081
log.debug "Querying provider to fetch User ID"
81-
client.getUserProfile(credentials, context, null).orElse(null)
82+
client.getUserProfile(credentials, context, JEESessionStore.INSTANCE).orElse(null)
8283
}
8384

8485
OauthUser getOauthUser(String provider, UserProfile profile) {

0 commit comments

Comments
 (0)