Package io.jmix.sessions.resolver
Class OAuth2AndCookieSessionIdResolver
java.lang.Object
io.jmix.sessions.resolver.OAuth2AndCookieSessionIdResolver
- All Implemented Interfaces:
org.springframework.session.web.http.HttpSessionIdResolver
public class OAuth2AndCookieSessionIdResolver
extends Object
implements org.springframework.session.web.http.HttpSessionIdResolver
Uses oauth2 access token and cookies to search session id.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.session.web.http.HttpSessionIdResolver
protected org.springframework.beans.factory.ObjectProvider<SessionData>
protected org.springframework.security.oauth2.provider.token.TokenStore
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
expireOAuth2Session
(javax.servlet.http.HttpServletRequest request) void
expireSession
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected String
getAccessToken
(javax.servlet.http.HttpServletRequest request) protected String
getRefreshToken
(javax.servlet.http.HttpServletRequest request) protected boolean
isAccessTokenRequest
(javax.servlet.http.HttpServletRequest request) protected boolean
isOAuth2Request
(javax.servlet.http.HttpServletRequest request) protected boolean
isRefreshTokenRequest
(javax.servlet.http.HttpServletRequest request) resolveOAuth2SessionIds
(javax.servlet.http.HttpServletRequest request) resolveSessionIds
(javax.servlet.http.HttpServletRequest request) protected void
setOAuth2SessionId
(javax.servlet.http.HttpServletRequest request, String sessionId) void
setSessionDataProvider
(org.springframework.beans.factory.ObjectProvider<SessionData> sessionDataProvider) void
setSessionId
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String sessionId) void
setTokenStore
(org.springframework.security.oauth2.provider.token.TokenStore tokenStore)
-
Field Details
-
tokenStore
protected org.springframework.security.oauth2.provider.token.TokenStore tokenStore -
cookieHttpSessionIdResolver
protected org.springframework.session.web.http.HttpSessionIdResolver cookieHttpSessionIdResolver -
sessionDataProvider
-
-
Constructor Details
-
OAuth2AndCookieSessionIdResolver
public OAuth2AndCookieSessionIdResolver()
-
-
Method Details
-
resolveSessionIds
- Specified by:
resolveSessionIds
in interfaceorg.springframework.session.web.http.HttpSessionIdResolver
-
setSessionId
public void setSessionId(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String sessionId) - Specified by:
setSessionId
in interfaceorg.springframework.session.web.http.HttpSessionIdResolver
-
expireSession
public void expireSession(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) - Specified by:
expireSession
in interfaceorg.springframework.session.web.http.HttpSessionIdResolver
-
resolveOAuth2SessionIds
-
setOAuth2SessionId
-
expireOAuth2Session
protected void expireOAuth2Session(javax.servlet.http.HttpServletRequest request) -
isOAuth2Request
protected boolean isOAuth2Request(javax.servlet.http.HttpServletRequest request) -
isRefreshTokenRequest
protected boolean isRefreshTokenRequest(javax.servlet.http.HttpServletRequest request) -
isAccessTokenRequest
protected boolean isAccessTokenRequest(javax.servlet.http.HttpServletRequest request) -
getAccessToken
-
getRefreshToken
-
setTokenStore
@Autowired public void setTokenStore(org.springframework.security.oauth2.provider.token.TokenStore tokenStore) -
setSessionDataProvider
@Autowired public void setSessionDataProvider(org.springframework.beans.factory.ObjectProvider<SessionData> sessionDataProvider)
-