public class OAuth2Request extends Object
Modifier | Constructor and Description |
---|---|
|
OAuth2Request(org.forgerock.openam.rest.representations.JacksonRepresentationFactory jacksonRepresentationFactory,
org.restlet.Request request)
Constructs a new RestletOAuth2Request.
|
protected |
OAuth2Request(OAuth2Request request)
Copy the OAuth2 request.
|
Modifier and Type | Method and Description |
---|---|
static OAuth2Request |
forRealm(String realm)
Creates an
OAuth2Request which holds the provided realm only. |
org.forgerock.json.JsonValue |
getBody()
Gets the body of the request.
|
ClientRegistration |
getClientRegistration()
Get the OAuth2 client registration of the request.
|
Locale |
getLocale()
Get the request locale.
|
String |
getOps()
Gets the user's session public reference for this request.
|
<T> T |
getParameter(String name)
Gets the specified parameter from the request.
|
int |
getParameterCount(String name)
Gets the count of the parameter present in the request with the given name
|
Set<String> |
getParameterNames()
Gets the name of the parameters in the current request
|
org.restlet.Request |
getRequest()
Gets the actual underlying request.
|
String |
getSession()
Gets the user's session for this request.
|
Collection<Token> |
getTokens()
Get all the tokens that have been used in this request.
|
void |
setClientRegistration(ClientRegistration clientRegistration)
Set the OAuth2 client registration.
|
void |
setOps(String ops)
Sets the user's session public reference for this request.
|
void |
setSession(String sessionId)
Sets the user's session for this request.
|
protected OAuth2Request(OAuth2Request request)
request
- the OAuth2 request@Inject public OAuth2Request(org.forgerock.openam.rest.representations.JacksonRepresentationFactory jacksonRepresentationFactory, org.restlet.Request request)
jacksonRepresentationFactory
- The factory class for JacksonRepresentation
.request
- The Restlet request.public org.restlet.Request getRequest()
public <T> T getParameter(String name)
T
- The type of the parameter.name
- The name of the parameter.public int getParameterCount(String name)
name
- The name of the parameterpublic Set<String> getParameterNames()
public org.forgerock.json.JsonValue getBody()
public Collection<Token> getTokens()
public void setSession(String sessionId)
sessionId
- The user's session.public String getSession()
public void setOps(String ops)
ops
- The user's session public reference.public String getOps()
public ClientRegistration getClientRegistration()
public static OAuth2Request forRealm(String realm)
OAuth2Request
which holds the provided realm only.realm
- The request realm.OAuth2Request
.public void setClientRegistration(ClientRegistration clientRegistration)
clientRegistration
- The client registration.Copyright © 2010-2016, ForgeRock All Rights Reserved.