Package org.pac4j.play
Class PlayWebContext
java.lang.Object
org.pac4j.play.PlayWebContext
- All Implemented Interfaces:
org.pac4j.core.context.WebContext
This class is the web context for Play (used both for Java and Scala).
"Session objects" are managed by the defined SessionStore
.
- Since:
- 1.1.0
- Author:
- Jerome Leleu
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPlayWebContext
(play.api.mvc.RequestHeader scalaRequest) PlayWebContext
(play.mvc.Http.RequestHeader javaRequest) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addResponseCookie
(org.pac4j.core.context.Cookie cookie) protected Object
getBody()
play.mvc.Http.RequestHeader
play.api.mvc.RequestHeader
play.mvc.Http.Session
getPath()
getRequestAttribute
(String name) Collection<org.pac4j.core.context.Cookie>
getRequestHeader
(String name) getRequestParameter
(String name) getResponseHeader
(String name) int
boolean
isSecure()
void
setNativeSession
(play.mvc.Http.Session session) void
setRequestAttribute
(String name, Object value) void
setResponseContentType
(String contentType) void
setResponseHeader
(String name, String value) play.mvc.Http.Request
supplementRequest
(play.mvc.Http.Request request) play.mvc.Http.RequestHeader
supplementRequest
(play.mvc.Http.RequestHeader request) play.api.mvc.Result
supplementResponse
(play.api.mvc.Result result) play.mvc.Result
supplementResponse
(play.mvc.Result result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.pac4j.core.context.WebContext
getProtocol, getRequestURL
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
PAC4J_REQUEST_ATTRIBUTES
-
javaRequest
protected play.mvc.Http.RequestHeader javaRequest -
scalaRequest
protected play.api.mvc.RequestHeader scalaRequest -
requestContent
-
responseHeaders
-
responseCookies
-
responseContentType
-
session
protected play.mvc.Http.Session session
-
-
Constructor Details
-
PlayWebContext
public PlayWebContext(play.mvc.Http.RequestHeader javaRequest) -
PlayWebContext
public PlayWebContext(play.api.mvc.RequestHeader scalaRequest)
-
-
Method Details
-
getNativeJavaRequest
public play.mvc.Http.RequestHeader getNativeJavaRequest() -
getNativeScalaRequest
public play.api.mvc.RequestHeader getNativeScalaRequest() -
getRequestHeader
- Specified by:
getRequestHeader
in interfaceorg.pac4j.core.context.WebContext
-
getRequestMethod
- Specified by:
getRequestMethod
in interfaceorg.pac4j.core.context.WebContext
-
getRequestParameter
- Specified by:
getRequestParameter
in interfaceorg.pac4j.core.context.WebContext
-
getRequestParameters
- Specified by:
getRequestParameters
in interfaceorg.pac4j.core.context.WebContext
-
getBody
-
setResponseHeader
- Specified by:
setResponseHeader
in interfaceorg.pac4j.core.context.WebContext
-
getResponseHeader
- Specified by:
getResponseHeader
in interfaceorg.pac4j.core.context.WebContext
-
getServerName
- Specified by:
getServerName
in interfaceorg.pac4j.core.context.WebContext
-
getServerPort
public int getServerPort()- Specified by:
getServerPort
in interfaceorg.pac4j.core.context.WebContext
-
getScheme
- Specified by:
getScheme
in interfaceorg.pac4j.core.context.WebContext
-
isSecure
public boolean isSecure()- Specified by:
isSecure
in interfaceorg.pac4j.core.context.WebContext
-
getFullRequestURL
- Specified by:
getFullRequestURL
in interfaceorg.pac4j.core.context.WebContext
-
getRemoteAddr
- Specified by:
getRemoteAddr
in interfaceorg.pac4j.core.context.WebContext
-
getRequestAttribute
- Specified by:
getRequestAttribute
in interfaceorg.pac4j.core.context.WebContext
-
setRequestAttribute
- Specified by:
setRequestAttribute
in interfaceorg.pac4j.core.context.WebContext
-
getRequestCookies
- Specified by:
getRequestCookies
in interfaceorg.pac4j.core.context.WebContext
-
getPath
- Specified by:
getPath
in interfaceorg.pac4j.core.context.WebContext
-
addResponseCookie
public void addResponseCookie(org.pac4j.core.context.Cookie cookie) - Specified by:
addResponseCookie
in interfaceorg.pac4j.core.context.WebContext
-
setResponseContentType
- Specified by:
setResponseContentType
in interfaceorg.pac4j.core.context.WebContext
-
getRequestContent
- Specified by:
getRequestContent
in interfaceorg.pac4j.core.context.WebContext
-
getNativeSession
public play.mvc.Http.Session getNativeSession() -
setNativeSession
public void setNativeSession(play.mvc.Http.Session session) -
supplementRequest
public play.mvc.Http.Request supplementRequest(play.mvc.Http.Request request) -
supplementRequest
public play.mvc.Http.RequestHeader supplementRequest(play.mvc.Http.RequestHeader request) -
supplementResponse
public play.mvc.Result supplementResponse(play.mvc.Result result) -
supplementResponse
public play.api.mvc.Result supplementResponse(play.api.mvc.Result result)
-