public class OAuth2Request extends Object
Constructor and Description |
---|
OAuth2Request(JacksonRepresentationFactory jacksonRepresentationFactory,
org.restlet.Request request)
Constructs a new RestletOAuth2Request.
|
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.
|
OAuth2Constants.EndpointType |
getEndpointType()
Get EndpointType.
|
Locale |
getLocale()
Get the request locale.
|
<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.
|
<T extends Token> |
getToken(Class<T> tokenClass)
Get a Token that is in play 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 |
setSession(String sessionId)
Sets the user's session for this request.
|
<T extends Token> |
setToken(Class<T> tokenClass,
T token)
Set a Token that is in play for this request.
|
@Inject public OAuth2Request(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 <T extends Token> void setToken(Class<T> tokenClass, T token)
T
- The type of token.tokenClass
- The token type.token
- The token instance.public <T extends Token> T getToken(Class<T> tokenClass)
T
- The type of token.tokenClass
- The token type.public Collection<Token> getTokens()
public void setSession(String sessionId)
sessionId
- The user's session.public String getSession()
public Locale getLocale()
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.public OAuth2Constants.EndpointType getEndpointType()
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.