Class VertxWebContext

  • All Implemented Interfaces:
    org.pac4j.core.context.WebContext

    public class VertxWebContext
    extends java.lang.Object
    implements org.pac4j.core.context.WebContext
    WebContext implementation for Vert.x 3.
    Since:
    2.0.0
    Author:
    Jeremy Prime
    • Constructor Detail

      • VertxWebContext

        public VertxWebContext​(io.vertx.ext.web.RoutingContext routingContext,
                               org.pac4j.core.context.session.SessionStore<VertxWebContext> sessionStore)
    • Method Detail

      • getRequestParameter

        public java.util.Optional<java.lang.String> getRequestParameter​(java.lang.String name)
        Specified by:
        getRequestParameter in interface org.pac4j.core.context.WebContext
      • getRequestParameters

        public java.util.Map<java.lang.String,​java.lang.String[]> getRequestParameters()
        Specified by:
        getRequestParameters in interface org.pac4j.core.context.WebContext
      • getRequestAttribute

        public java.util.Optional<java.lang.Object> getRequestAttribute​(java.lang.String s)
        Specified by:
        getRequestAttribute in interface org.pac4j.core.context.WebContext
      • setRequestAttribute

        public void setRequestAttribute​(java.lang.String s,
                                        java.lang.Object o)
        Specified by:
        setRequestAttribute in interface org.pac4j.core.context.WebContext
      • getRequestHeader

        public java.util.Optional<java.lang.String> getRequestHeader​(java.lang.String name)
        Specified by:
        getRequestHeader in interface org.pac4j.core.context.WebContext
      • getRequestMethod

        public java.lang.String getRequestMethod()
        Specified by:
        getRequestMethod in interface org.pac4j.core.context.WebContext
      • getRemoteAddr

        public java.lang.String getRemoteAddr()
        Specified by:
        getRemoteAddr in interface org.pac4j.core.context.WebContext
      • setResponseHeader

        public void setResponseHeader​(java.lang.String name,
                                      java.lang.String value)
        Specified by:
        setResponseHeader in interface org.pac4j.core.context.WebContext
      • getResponseHeaders

        public java.util.Map<java.lang.String,​java.lang.String> getResponseHeaders()
      • setResponseContentType

        public void setResponseContentType​(java.lang.String s)
        Specified by:
        setResponseContentType in interface org.pac4j.core.context.WebContext
      • getServerName

        public java.lang.String getServerName()
        Specified by:
        getServerName in interface org.pac4j.core.context.WebContext
      • getServerPort

        public int getServerPort()
        Specified by:
        getServerPort in interface org.pac4j.core.context.WebContext
      • getScheme

        public java.lang.String getScheme()
        Specified by:
        getScheme in interface org.pac4j.core.context.WebContext
      • isSecure

        public boolean isSecure()
        Specified by:
        isSecure in interface org.pac4j.core.context.WebContext
      • getFullRequestURL

        public java.lang.String getFullRequestURL()
        Specified by:
        getFullRequestURL in interface org.pac4j.core.context.WebContext
      • getRequestCookies

        public java.util.Collection<org.pac4j.core.context.Cookie> getRequestCookies()
        Specified by:
        getRequestCookies in interface org.pac4j.core.context.WebContext
      • addResponseCookie

        public void addResponseCookie​(org.pac4j.core.context.Cookie cookie)
        Specified by:
        addResponseCookie in interface org.pac4j.core.context.WebContext
      • getPath

        public java.lang.String getPath()
        Specified by:
        getPath in interface org.pac4j.core.context.WebContext
      • getSessionStore

        public org.pac4j.core.context.session.SessionStore getSessionStore()
        Specified by:
        getSessionStore in interface org.pac4j.core.context.WebContext
      • getVertxUser

        public Pac4jUser getVertxUser()
      • removeVertxUser

        public void removeVertxUser()
      • setVertxUser

        public void setVertxUser​(Pac4jUser pac4jUser)
      • getVertxSession

        public io.vertx.ext.web.Session getVertxSession()
      • getVertxRoutingContext

        public io.vertx.ext.web.RoutingContext getVertxRoutingContext()