Class CookieService


  • @RequestScoped
    public class CookieService
    extends Object
    Author:
    Yuriy Zabrovarnyy
    • Constructor Detail

      • CookieService

        public CookieService()
    • Method Detail

      • getSessionIdFromCookie

        public String getSessionIdFromCookie​(jakarta.servlet.http.HttpServletRequest request)
      • getUmaSessionIdFromCookie

        public String getUmaSessionIdFromCookie​(jakarta.servlet.http.HttpServletRequest request)
      • getConsentSessionIdFromCookie

        public String getConsentSessionIdFromCookie​(jakarta.servlet.http.HttpServletRequest request)
      • getSessionStateFromCookie

        public String getSessionStateFromCookie​(jakarta.servlet.http.HttpServletRequest request)
      • getCurrentSessions

        public Set<String> getCurrentSessions()
      • getCurrentSessions

        public Set<String> getCurrentSessions​(jakarta.servlet.http.HttpServletRequest request)
      • addCurrentSessionCookie

        public void addCurrentSessionCookie​(io.jans.as.common.model.session.SessionId sessionId,
                                            jakarta.servlet.http.HttpServletRequest request,
                                            jakarta.servlet.http.HttpServletResponse httpResponse)
      • getValueFromCookie

        public String getValueFromCookie​(jakarta.servlet.http.HttpServletRequest request,
                                         String cookieName)
      • getRpOriginIdCookie

        public String getRpOriginIdCookie()
      • getValueFromCookie

        public String getValueFromCookie​(String cookieName)
      • getSessionIdFromCookie

        public String getSessionIdFromCookie()
      • creatRpOriginIdCookie

        public void creatRpOriginIdCookie​(String rpOriginId)
      • creatRpOriginIdCookie

        public void creatRpOriginIdCookie​(String rpOriginId,
                                          jakarta.servlet.http.HttpServletResponse httpResponse)
      • createCookieWithState

        public void createCookieWithState​(String sessionId,
                                          String sessionState,
                                          String opbs,
                                          jakarta.servlet.http.HttpServletRequest request,
                                          jakarta.servlet.http.HttpServletResponse httpResponse,
                                          String cookieName)
      • createSessionIdCookie

        public void createSessionIdCookie​(io.jans.as.common.model.session.SessionId sessionId,
                                          jakarta.servlet.http.HttpServletRequest request,
                                          jakarta.servlet.http.HttpServletResponse httpResponse,
                                          boolean isUma)
      • createSessionIdCookie

        public void createSessionIdCookie​(io.jans.as.common.model.session.SessionId sessionId,
                                          boolean isUma)
      • createSessionStateCookie

        public void createSessionStateCookie​(String sessionState,
                                             jakarta.servlet.http.HttpServletResponse httpResponse)
      • createOPBrowserStateCookie

        public void createOPBrowserStateCookie​(String opbs,
                                               jakarta.servlet.http.HttpServletResponse httpResponse)
      • createCookie

        protected void createCookie​(String header,
                                    jakarta.servlet.http.HttpServletResponse httpResponse)
      • removeSessionIdCookie

        public void removeSessionIdCookie​(jakarta.servlet.http.HttpServletResponse httpResponse)
      • removeOPBrowserStateCookie

        public void removeOPBrowserStateCookie​(jakarta.servlet.http.HttpServletResponse httpResponse)
      • removeUmaSessionIdCookie

        public void removeUmaSessionIdCookie​(jakarta.servlet.http.HttpServletResponse httpResponse)
      • removeConsentSessionIdCookie

        public void removeConsentSessionIdCookie​(jakarta.servlet.http.HttpServletResponse httpResponse)
      • removeCookie

        public void removeCookie​(String cookieName,
                                 jakarta.servlet.http.HttpServletResponse httpResponse)